Having grown up back east, that's why I moved to Montana. I can now do in a weekend what used to take a year of planning and days just to get there...but...21 days is enough time. To be honest, do it as early as you can as in late May early June. Starting this upcoming weekend, all the kids are out of school and things will be crazy until after they go back. Definitely find out how early you can make reservations and do so like In January of next year or whenever the window opens. Don't wait.
First, find a couple of things you would like to do along the way. Even little things like Scotts Bluff in Nebraska. Try to make a short day and then check it out. Then maybe hammer it for a few days. You will know you are west when you see Scotts Bluff. From there, I'd hit the Black Hills for a couple of days and do the roads (Iron mountain/Needles highway). I wouldn't go to the sights themselves, you will see them but then again, been there done that you haven't.
So, from Scotts Bluff, its one day to the Black Hills, then two or three days there. One day to Yellowstone. There are numerous ways in. The route through Cody is nice. Plan on at least four days for Yellowstone. Good luck getting a campsite during the summer even if you hit Reserve America on day one.
Going from the Cody area would allow for a day trip to Red Lodge and the Beartooth highway. There are some campgrounds/full service in that area north of Cody toward Cooke City and it is a good base camp for the northern part of the park. The Mexican restaurant in Red Lodge is fun, great margaritas.
A sort of back way into Yellowstone would be to actually head south from Buffalo to Riverton. I take you this way because you can come in from 26 through Dubois (Decent KOA) and head to the area between the Tetons and Yellowstone. Why? Flagg Ranch is located in the area between the two parks. It is a very decent campground (as it is NOT a parking lot and has trees) with full service and is a great base camp for both parks. But it is not inexpensive. You will gulp at the price, but you will be well situated for the whole area. There is a dirt road that heads toward the tetons that is worth the drive right out of the store area. A couple of miles down that road is a small hike to a natural hot springs. Neat. Definitely go to Cooke City. Gardiner and West Yellowstone aren't that great except for the Discovery Center in West Yellowstone. Bears, wolves etc. West Yellowstone has a very nice parking lot type of campground with concrete pads and full service if that is your cup of tea. Gardiner has one or two places. IF you were really adventurous and wanted to go to Glacier come in from the south through Helena and up by Seeley Lake to West Blacier. Great campgrounds south of W. Glacier. Mountain Meadow is best. But you would be pushing it. IF, you did this, do the Going to the Sun and Many Glacier, don't worry about the rest. Two days. Eat at the Izaak Walton trout.
Things to do. Custer State Park Black Hills wildlife loop, half day. Campgrounds Custer, Big Pines nice multiple others. Devils tower (short day trip)from Black Hills. Do it and then Wildlife Loop in pm and dinner maybe at Bluebell lodge, trout.
Cody area do road 14A without the trailer and hit the Medicine Wheel at top of Bighorns.
This will NOT be an inexpensive trip but one you will remember.