I get this question a lot from both my clients and my friends and I'm about to give you a real science-based answer, ready?
The answer is..... whichever works best for you!
For the vast majority of people who exercise for general health benefits and to simply feel good, studies have proven that eating OR not eating before a workout will not make you lose more or less fat, OR gain more or less muscle. Some people fair better in their workout on empty stomach whereas some people need that fuel prior to a lift to stabilize their blood sugar.
And to be honest, this may change over time! I'll use myself as an example –
I used to always be a morning workout warrior. My alarm would go off before 5am, giving me a bit of time to wake up and muster up the courage to leave the warm bed, change into my workout clothes and head to the basement for a workout before most of the world was awake. I'd usually eat half of a banana or a small handful of cereal, just enough to ward off any hunger pains until my workout was done where I'd then fuel up with my signature protein smoothie bowl. For me, this worked, and it worked for years.
Fast forward to present day as I'm up multiple times at night breastfeeding my little one and clearly not getting the amount of sleep I was before, I've learned by trial and error that I NEED fuel in my body ahead of any workout, otherwise I just end up feeling sluggish and dragging through the moves (and in turn not really enjoying it at all).
There is no one size fits all here - both avenues work and both are fine!
Play around with it – if you're someone who doesn't typically eat prior to a workout, maybe try a small amount of easily digestible carbohydrates (think bananas, dried fruit, toast with jelly) and see if that helps your performance. On the flip side – if you're someone who typically eats a large meal prior to a lift and you maybe feel a bit slow during the session, you could try a smaller meal or just add more time after your meal and before your workout begins to allow your body more time to digest.
Do whatever makes YOUR lifting sessions feel better and more effective.