Before it has a catastrophic failure ideally. You should trust your AC technician’s recommendation, but in general these are indications that you should at least start budgeting for a new system:
Your AC is more than 12 years old
Your AC is not keeping up with your needs
Sudden increase in your electric bill
You need regular refrigerant refills