That depends on your skin. I brought a small tube and used hat, sunglasses, etc.
my girlfriend is fair-skinned and used more.
Fortunately, you can buy more at Tuolumne Meadows, Reds Meadows, VVR, etc.
You can also include more in your resupply shipments. If it turns out you don’t need it, it’s easy to find someone who does. Rather than carry enough for the entire trip, I’d carry enough for the first segment (Yosemite Valley to Tuolumne). Include some in your resupply packages, or purchase more (usually pretty easy to find, but also more expensive than you’ll get at home).
Keep in mind that the sun up in the Sierras is pretty strong. I saw some people covering up their arms and even their hands to protect their skin.
I got pretty tan on the trip — just not evenly. Arms from the sleeves down. Legs from the boots up. And even though I always wore a wide-brimmed hat and sunscreen, my face.