Last time I had this in the car it was the evap (also known as activated charcoal filter). There were no codes. Do you have fault codes?
https://www.ebay.co.uk/itm/BMW-3-G20...-/114440987453
That's what it looks like.
When you fuel up at the pumps and go beyond the clicks to the brim. Keep filling and keep filling although already full. The poor evap can suffer as it has a lot more to deal with.
Actually on another car the fuel pump seal had degraded. A previous owner put diesel in by mistake. So there was premature ware causing fumes to seep through into the cabin.
Lastly, shaguar had a recall on a fuel pipe. It might be worth checking hoses or demonstration to a tech the smell.
Home diagnostics? Use your nose. Close your vents turn your fan off. Cannot smell it? Likely to be outside. Have a sniff around the back seats. Remove the bench. See if you spot any fuel or smell it. The tank seal should be nice and sealed up. If there is fuel around it...
Try filling half a tank instead of full and see if it's stronger.
That's all I can think of for now. Good luck.