If you enjoy working out fasted, then you can do so, but it’s important for you to eat at least protein (but ideally, a whole meal) after your workout session.
However, if you notice that your training sessions aren’t the best because you’re hungry or don’t have enough energy, then you should consider having something to eat before your workout session.
For example, if you have a more intense training session coming up, such as leg day or an intense cardio session that will require more carbohydrates, it would be best for you to fuel before that session to have better workout performance. You’ll just want to prioritize fast, easily digestible carbohydrates beforehand.
Please visit this article that discusses what to eat before your training session.