This can happen at anytime before the options contract expires.
Options trading involves the concept of "exercising," which refers to the act of utilizing the right to buy or sell the underlying security outlined in the options contract. This action can be taken at any point before the contract reaches its expiration date. Essentially, exercising gives the option holder the power to take action on their chosen security at a time that is most favorable for their investment strategy.