Studying for the written you can do anytime, even simultaneously with the flying if you like. Most folks seem to like to “get the written out of the way” early on.
https://www.faa.gov/training_testing/testing/media/testing_matrix.pdf
For an initial written test...
“An airman applicant may present one or more of the following acceptable forms of authorization for all tests listed above (except PCH and PCP):
• Certificate of graduation issued by an FAA certificated pilot school (14 CFR § 61.71(a).
• Written statement or logbook endorsement from an authorized ground or flight instructor certifying that the applicant completed an applicable ground training or home study course and is prepared for the knowledge test (14 CFR § 61.35, 61.96(b)(3) or 61.103(d)(2)).”
King has a way of providing this from them, or your CFI can verify.
Different rules for a retest after a failure, but you won’t be doing that, right!
(Those are also in that document.)
Welcome back! Have fun!