Gas stations are reasonably regular along the route and finding fuel shouldn’t be a problem (at least every 30 to 40 miles). However, there are areas in the western states (particularly Arizona) where they can be as far as 100 miles apart. Also, if you plan on any side trips that take you off the beaten track and into the desert it would be dangerous to do so without first filling up.
Good advice is to fill up often and don’t let the tank go below half full.
It’s a good idea to fill up before crossing the California state line (basically in Kingman, Arizona) or embarking on a side trip to the Grand Canyon as the cost of gas will jump significantly when you enter the remote regions.
It’s also worth noting if you’ve not driven in the US before that you pay for your fuel before you fill up.