Welcome to the RTA Forum!
A few things to start:
What does the rest of your trip look like? Even if you've got it planned out, and don't think you need help, knowing the big picture of your plans can help us know what other things you're interested in. It also reveal something that could be better worked into this part of your trip.
The most common, and most scenic route would be to first head to Death Valley, then work your way up US-395, and then head across Tioga Pass into Yosemite. You could use your entire time just doing that, but with 8 days, you would also have the option of adding in some other places, depending how fast of a pace you like to travel. You could go up to Lake Tahoe, before heading back down to Yosemite, or after Yosemite, you could head onto Sequoia or over to the coast/Big Sur, before going up to San Francisco. You could also check out Napa/Wine Country before San Francisco. Again, a lot of this depends on your interests, and what else you'll be doing on your trip.
Also keep in mind, there is no point here where you will need 4 wheel drive, and in fact, driving any place where it would be required will likely violate your rental contract. More importantly, a regular sedan usually costs much much less. Also, San Francisco is not a place where a car is really needed, but depending upon how long you'll be there and where else you're going, it may be worth it to keep the same car for your entire trip to take advantages of long term rental rates.