Coffee works for me. I always take a larger-than-usual dose of strong coffee before a drive, and I pack some extra with me to take at rest stops. Although I usually end up ordering coffee wherever I stop instead. It’s also a good idea to make sure you get a good night’s sleep before the drive; I have on more than one occasion postponed the start of a trip by a few hours because I just hadn’t gotten enough sleep.
It’s also a good idea to stay hydrated, as dehydration can impair your cognitive ability. As for what works for me, I always find that I have an easier time focusing on the drive if I know where to find a diesel mechanic Dallas near my route while driving. Otherwise, every weird noise distracts me and makes me worry that the car or truck might break down in the middle of nowhere. I keep apps like https://www.truckup.com/ on my phone to make sure I can get help anywhere, which helps me relax and focus on the road.