Find your nearest “audiologist” or “audiology center” and ask them if they do “ear impressions for custom-fit in-ear monitors and earplugs”.
Do not buy headphones until you’ve discussed your product choice with them. You may find that they can be fit correctly but will have a huge unsightly bulge outside the ear canal. They will usually have Opinions, as it’s their job. Know your price range.
There’s no other way to do it but to go somewhere in person and have a cup of liquid goo poured into each of your ears by a trained professional. (Do not try this at home, etc.) They will send the molds off to be fit into your earphones, which either you’ll buy new from them or turn over to the audiologist at impressions time.
You can also use the mold to produce musician’s earplugs that are transparent and have swappable filters that have different dB reductions. I use my -9dB pair for parties so I can hear better.
I assume they keep the mold on file for a little while, in case of fit issues or whatever, but it’s been a decade since I last went so I don’t imagine they still have it. (Who knows, though!)
When you have them in hand, turn your volume way down and be very, very careful with them. You are sticking these deeper into your ear than headphones have ever gone before. You can go deaf very rapidly. If your phone has a volume limit setting, enable it and turn it the lowest point (75dB on iPhone). If you’re constantly wishing it was louder after a day or two, raise it 5dB and wait a bit longer. The audiologist will make scary comments about risk of hearing damage, and give you a hearing test to see how you’re doing beforehand. Listen to them. It’s deadly serious stuff.
IEMs are very-high-end personal monitors that are custom molded to your body to fit perfectly in your ear canal. Your ear canals on your left and right side are different sizes and shapes, so you'll have quite a bit of difference between them.
Most importantly, rather than using speakers like headphones, they use a technology called balanced armature drivers which have incredible properties.
An example manufacturer is https://alclair.com I have two sets of theirs, one for master studio tracks, and another for live music that's more geared for guitar and bass playing.
They block out nearly all outside noise, some up to 28db of protection, which is wonderful.
Can you share URLs to some recommended vendors of the products you're talking about?