Do not believe this nonsense.
People have been cooking with onions and garlic for centuries.
I don’t think its the onions and garlic, per se. Its the high temperature cooking of them.
No need for that anyway...I always use evoo and never hit its smoke point. Dishes turn out fine.