Before the training
Whether endurance or weight training. No matter. Actually, you should always eat something small before you take any decent physical exercise. Your body needs this "support".
Whether banana, protein bars or other power snacks. In a healthy mass your body simply needs it! After all, what should it use if you haven't eaten for more than ten hours? Smart as the body is, it takes energy where it shouldn't. The consequences after training are ravenous appetite attacks that can destroy your whole training.
During the training
Almost even more important than the supply before the training is the one during the training. But here we are talking more about liquid food.
High quality drinks without a lot of sugar. But rather drinks that supply your body with essential trace elements, amino acids or vitamins during training. Protein drinks or bars are also good if you feel hungry during training. It is important that you increase the number of carbohydrates during training by a factor of about ten compared to before training.
After the training
It is often said: "it is best to go into the shower with the protein shake immediately after training to achieve the best effect". That is absolute nonsense. From the moment the first training stimulus is given, the body is ready to process all the information from your shake and use it in a targeted manner until about three hours later.
So: take "good" carbohydrates after training and increase the amount of protein in order to supply your muscles in a targeted way and to start your regeneration correctly. Do not drink any sweet drinks and be satisfied with your performance - because tomorrow is definitely coming!