One thing I seriously underestimated when I started hiking was hydration. I thought water was enough but after a few rough trails I started doing more research and it genuinely changed how I feel on longer hikes.
Turns out plain water doesn't replace what you actually lose through sweat. Sodium, potassium, magnesium. Those are the electrolytes your muscles need to keep going. Since I started taking electrolytes that include all three before and during my hikes, the difference in energy and cramp prevention has been pretty noticeable.