The best time to start is now! Don’t worry in the slightest about not being in the shape that you want to be in.
And don’t waste time thinking you should work on your general fitness to start your martial arts journey. Martial arts will help with that!