OEM only for the last 5 yrs.
I have used Fram, Denso (FirstTimeFit) and Wix in the past.
Most aftermarket ones fit fine, but some have been loose. Why take a chance? Not worth it, in my opinion, when you remember that filtered air is going inside the combustion chamber. I usually keep my cars 15+ years. I have compared OEM Toyota filter (from dealership) vs. Fram filter from RA. The OEM filter has more pleats and seems to have sturdier filter material than the Fram. Higher cost of OEM filter amortized over the life of the filter is quite small for the added peace of mind.
Most people assume that since Denso is OEM supplier to Toyota the Denso aftermarket filter (made for the retail market) are of equal quality to the one ones you buy from the dealership. I have my doubts. I suspect that the denso filter sold as OEM from the dealership is likely made to a higher (Toyota specified) spec and standards then the aftermarket Denso. Wonder if anyone has compared them side by side.