I think you're looking for a book about the Allied side of the Battle Of The Atlantic, but if you're interested in WWII submarines I highly recommend One Of Our Submarines by Edward Young.
It's the autobiographical account of an RNVR officer from joining the submarine service through being a British submarine captain in the Pacific. He even escapes a sinking submarine. It's a technically accurate and very well written book. It benefits greatly from Young having been a publisher before the war.
The book makes you very much appreciate how complicated and delicate WWII submarines were. His experiences will resonate with what other submarine captains experienced everywhere in the war.