I don't go to Yosemite Valley in the summer any more - the crowds and traffic are insane. I prefer to visit between October and April.
But if you're going, aim for mid-week. Even then there can be traffic jams and lines of cars waiting to park in parking lots. So if you're staying in the Valley, try to walk, ride or shuttle bus to places.
Accommodations (hotels, campgrounds, tent cabins) during summer in the Valley book up months in advance. You'll be unlikely to find anything this late in the game, so staying outside the Valley is probably your only option (you might find an opening from a last minute cancellation). Your best bet in that case is camping or staying outside the Valley. I've always liked Yosemite Bug Resort - affordable, fun place to stay with many different options.
Hikes in the Valley: Mist Trail, Yosemite Falls, Four Mile Trail are the big ones.
So maybe you spend one day in the Valley checking out the falls and doing one of those hikes and stay outside the Valley.
Tuolumne Meadows is an amazing part of Yose and sees far fewer crowds. Still covered in snow now and will have a lot of snow in the passes and high trails over the next month. August might be best for Tuolumne Meadows. Hetch Hetchy also sees far fewer people.
There are some first-come/served camping options in the park - the NPS Yose website discusses all that. Generally requires getting to the ranger station in early morning and waiting for them to open.
Lastly and probably most importantly if you are hiking: creeks will be running really high and fast over the next several weeks (months?). Some will be impassable so checking with the ranger is a good idea. And just because a creek looks smooth doesn't mean it isn't fast moving. And if you're camping: everything the rangers tell you about bears is true - properly store your food.
Have fun. It's an amazing place.