I read a good book about this by Gerald Snyder titled “The Royal Oak Disaster”.
The standard drill when under air attack was to go below to put the armored deck above you. Nobody thought a sub could get in so when the explosions came, every who could rushed below decks “to escape the bombs” - and sealed their fate.
She capsized, which accounts for the high mortality rate.
Gunther Prien, the U-boat skipper, got his in March of 1941, along with the rest of the crew.
I still have a copy of that book, but have not read it recently.
As I recall, among other problems contributing to casualties were armored hatches that slid or jammed shut, trapping the crew below the armored deck, and deadlights...These ( again trusting to fading memory ) covered the portholes in the ship's side above the armor belt, and while they weren't watertight, the also hindered escape via the portholes.
Also, as I recall, at first there was some doubt whether the ship was actually being attacked, or there had been an explosion in the forward paint locker.