There's this super prevalent but outdated method where you add 4 inches to your underbust measurement. There's some history about why it came into place but nowadays it persists mostly because of ignorance and because it helps brands cram more people into their size range. Basically ignore it, even if a brand says to +4 for a good fit, I haven't heard of any where that's reflected in the design of the bras. The bra industry is a mess.
I'm guessing that at 34E you're approximately 34 inch underbust and 40 inch bust, which is a 6 inch difference. Count 6 letters in the bra alphabet and you get E cup in UK sizing, so 34E.
But if you added 4 to the underbust, you have a "38 inch" underbust and a 40 inch bust, which is a 2 inch difference and thus a B cup, 38B. I hope that helps explain where this result came fromBy the way UK sizing is recommended regardless of your country because it's the most consistent and it will be easier to find bras in your size of UK origin. UK letters go A B C D DD E F FF G GG H HH J JJ etc.
note that DD and E are not the same in UK even though they are in US