First – don’t panic! This is a very common experience. Often, athletes will start a course of treatment for long before they need to apply for a TUE (e.g., when added to the NAP or meet the IF’s definition of an international-level athlete).
Submit an application as soon as possible once you are required to do so.