The best time to modify your vehicle is the minute you decide to do it. This allows you to get the most value for the modifications throughout the lifetime that you own said vehicle. Some may be concerned with the chance that warranty is voided with certain modifications, so keep that in mind with the type of upgrades you plan to do. Cosmetic changes such as wheels, aero, window-film etc.. are generally warranty-safe and can add some new ‘spice’ to an older vehicle you may be getting bored with.
Today’s modern turbocharged engines take very well to an ECU flash/tune which will dramatically increase the power and torque. Engine upgrades are most likely to void your warranty and cause serious grief should you incur major issues down the road. If you’re past the warranty period, then a flash tune, intake system and exhaust are common and value-packed upgrades to dramatic improve the sound and feel in today’s modern car.
Generally, if you have plans to sell the car in the near future, I wouldn’t recommend spending any money on modifications, as they rarely increase the resale value of your car. Some modifications can be carried over to another vehicle, if you stay within the same brand and platform type (wheels, intake etc).
It’s also recommended that you modify a car that does not require any maintenance, so make sure everything is in perfect working order before spending money on (arguably) non-essential parts.