If you want to lose weight, you should fast after exercise, not only after exercise, but also reduce your diet for the whole day.
You can eat if you want to gain muscle. The staple food (carbohydrate) can supplement the consumed energy and cooperate with protein to accelerate muscle synthesis, so you need to supplement protein after exercise.
It takes about 30 minutes to eat after exercise.