There is no 100% optimal way. Starting now and adjusting a bit as you go is a thousand times better than never starting because you can’t decide on a routine. Download Genki and just go through that. Bonus points if you download Tae Kim, Japanese in 90 days, Tobira, A Dictionary of Japanese Grammar, A Dictionary of Basic Japanese Particles (and the Advanced one as well), Kodansha Kanji Learner’s Course(KKLC), All About Particles, Genki’s graded readers, and KKLC’s graded readers. Supplement Genki with the other books mentioned, and some googling, when you want clarification on a lesson or for any other question you have.
Learn hiragana and katakana immediately, there are good methods and websites a google search away. Then move on to kanji radicals, which are the basic components of kanji. Radicals will help you with mnemonics and breaking kanji down into parts so you aren’t overwhelmed.
Anki is very useful for supplementing your grammar lessons, but Anki alone will never teach you Japanese. Start each lesson after learning the vocab, so you don’t spend 90% of your learning time looking up words. Seth Clydesdale has a pretty useful website for Genki that has Anki decks and other exercises.
If you don’t wanna do Genki, basically do what I said but with another grammar book of your choice (all of the ones I mentioned are good.) Again, though, even if you aren’t 100% confident in your choice for how to learn, as long as you actually study consistently you will eventually make it.
Lastly, don’t bother with /DJT/. They only care about z tier e-celebs from their threads 5 years ago, and shitting on people for learning the language because they failed and gave up long ago. No, I am not kidding. Good luck. Learning a language is incredibly rewarding, especially when you run into it a lot like most vtuber fans.