The best training time is very individual. Each organism reacts differently to load at different times of the day.
Ideally, you should try each time frame to determine what suits you personally. Through such an "experiment," you'll know when your body is most productive.
Some studies say that for gaining muscle, the optimal time is in the evening, somewhere around 6:00 p.m., and for burning fat - in the morning (ideally on an empty stomach, but here too, you should be guided by the feelings in the body).