Have noticed the interior has the odor of spoiled milk or rotten cheese that comes and goes, sometimes in warm weather or freezing. Wife and I have sniffed everywhere but can't find any "hot spot(s)". Had the car deep cleaned which seemed to help but now its back again. Pulled the cabin filter, but it was fresh smelling no odor hint. Ran heater full blast and sniffed every vent but they seemed fresh no odor. I googled about Prime odors and one suggestion is the evaporator may be moldy/mildewed, and gave a suggestion how to mitigate it using Lysol aerosol (have not tried this). Another said water can get trapped inside doors and stagnate odors (sniffed each window opening was negative). We had an accident where driver rear panel was punctured, and had to wait parts before repairs so wonder if water could have gotten into insulation or matting which has molded/mildewed. Probably require body shop to tear apart and a do look see and replace. Was considering taking to Toyota to see what they can do.
Make sure the carpet under the dash and feet is dry and not stinky, as noted. It comes and goes. Can you correlate that to what the HVAC system might be doing at the time? Warm weather-turn on A/C-stinky? Then goes away? Freezing weather-I wonder if the A/C comes on in some modes for dehumidification even in freezing weather? Did you have the car since new, as in the previous owner spilled something nasty? I had a stinky A/C system in another car. I took out the cabin filter sprayed the inside with some stuff from the Advance (parts store) made to do this, with the heat/fan on high, as I recall. Also sprayed in vents. Put in new cabin filter. It worked. I think Toyota sells its own stuff. This is what I used: