There can be a multitude of reasons why your white quartz could turn yellow. Many causes have to do with how the quartz is manufactured. Quartz countertops are a mix of about 90% quartz chips and 10% resins and polymers that are then heat treated and dried. Once installed, this gives the countertops great resistance to stains, chips, scratches, and heat. That said, it’s not impervious to damage. The most common source of yellowing in quartz comes from high pH substances on the countertops or from heat damage.
The first source can consist of anything from cleaners being used that are too harsh for the stone’s finish (like bleach or ammonia), to not wiping up coffee spills, wine, tomato sauce, etc. The best rule here is to regularly wipe the surface off with a little dish soap mixed with water using a non-abrasive cloth (e.g. a microfiber one). The second source — heat damage — is also easy to prevent.
Quartz is heat resistant up to around 300 degrees Fahrenheit, but anything like a hot pan or tray set on the counter can damage the resins and polymers in the counter, resulting in a yellowing stain. With stains that won’t come up with that, a mix of rubbing alcohol (90%) and water (10%) is recommended. If anything won’t come up after that, contact a professional for restoration.