Within roughly two and a half months of the start of the tax year you want it to apply to, or any time during the preceding year.
File later and the election generally takes effect the following year. Late election relief exists where you can show reasonable cause, but it is not automatic.
We handle this for founders running US companies.