I knew a fairly new pilot who ran out of gas and ended up in a lake. Fortunately he survived. When I penciled out the numbers afterwards, it was pretty clear that his error was that he didn’t calculate in a very strong headwind. If the air had been calm, he would have had plenty of fuel.
When I flew in the past I planned on my range based on fuel burn and time. If VFR I always used IFR rules for fuel burn and to get to an alternative. It is just plain damn sense. Actually, flying IFR even if the weather is VFR is much safer. ATC knows how much fuel and time you have on board and they give your separation from other aircraft. They will help you. With the rare exception of some duffas, they are the good guys.
Once I was flying up to Coloradan and encountered head winds in excess of forecasts. I had decided to divert to another airport for fuel. ATC then reminded me of my theoretical fuel left and time aloft. I had already made the decision but it was good to know that ATC was there for me. ATC can piss you off at times, but they do “have your back.”
One year while I was instructing, a rich jerk taxed his twin (Beech Dutches) out of the hangar (yikes), parked it at the pumps, left both engines running while he left the airplane to fill-up on fuel (yikes!yikes!!). Guy continued to make really stupid mistakes but never got hurt.