That’s sort of the magic (and horror) of writing. There really isn’t any one way to do it. It’s completely up to you.
In animation you have scripted and “premise” based animation. Scripted stuff is storyboarded from a script and Premise is usually written by the storyboard artist as they go. Premise cartoons are almost always comedy, but they don’t have to be. In truth, both methods are just different paths to an end.
I’ve read a lot of books on writing and entertainment. Robert McKee’s “Story” and “Save the Cat” are both books on how to write screenplays, but they come at it from different directions. If you read screenplays, you’ll know that they’re pretty formulaic. Even so, screenplays can distinguish themselves in all sorts of ways. The script for Alien reads more like a poem than a script at times. Futurama used an unusual format for TV which is a big no-no, but nobody balked at it.
I guess if I have any advice, it’s to just start writing and see where it goes. If you’re like me, you’ll probably hate whatever you’re writing at first, but reworking stuff is half the journey. If you can, force yourself into a commitment to finish something. A page. A chapter. An act. Whatever. Make yourself get that into a place where you’re happy enough with it that you can move on.
If you get stuck, skip ahead to the next part you’re excited about. By the time you’re into that, you may see threads of how that moment can connect to those before it. If you don’t want to think linearly, you don’t have to. You’re in charge of the entire history of your story and characters.
People always say not to be afraid to kill your darlings. I say learn to revel in it. Eventually, you’re going to have to flush dozens or hundreds of hours of work down the drain. But that’s nothing in the face of what you’re trying to build. Anything you tear out just makes way for something better.
It’s going to be awesome, so finish it!