Since you mentioned UCSD in another thread, UCSD’s website says,
If you have your eyes set on UCSD, take an AP science and the corresponding subject test in May or June (after you have taken the course) of your junior year.
https://admissions.ucsd.edu/first-year/application-requirements.html