We did this trip in reverse last summer. Spent the 4th of July in Spearfish and then went on to Yellowstone. Great trip! I have two recommendations. If "Small Town America" is your thing it doesn't get any better than the Fourth of July Parade and Rodeo in Belle Fourche. It had been on my bucket list for many years and it didn't disappoint! While there check out the American West Bar and Grill. Fried Beef Tips are amazing. I ate there 3 times!
Touring Yellowstone I downloaded this App:
https://gypsyguide.com/tour/yellowstone-national-park/
I highly recommend. Even though you don't have cell service or wifi the App know where you are at in the park. Tell you what is coming up, what is a must see, things you might want to see and tons of general information. We absolutely loved it. It's like having your own private tour guide.