All of the festoon LED's on the inside/under doors/front footwells/vanity lights are 37mm.
The rear footwell lights (lights under the rear seats) are 42mm festoon.
The rest of the bulbs are 194 wedge bulbs, including license plate lights, rear hatch lights, dome lights, and puddle lights on the mirrors.
The ONLY BULBS MONITORED BY THE CANBUS AND MUST BE ERROR FREE are the license plate lights and the puddle lights on the mirrors. The rest can be regular SMD LED bulbs.
Count your lights up and order them off amazon, ebay etc. Here is a set (although I don't normally recommend buying pre-made "sets")
19 x Error Free White LED Interior Light Package for 2000 2006 BMW x5 Series E53 | eBay