Oh it's definitely not just drawing random boxes. Panel transitions and layout are pretty important, they're the comic equivalent of how you construct a sentence if you're writing prose. You don't just throw words together when you write a story, you deliberately arrange sentences and words/phrases within a sentence in a way that conveys your story best (you need to emphasize some things, control the flow and pacing etc).
You could probably find a lot of things online about making comics, and there are books published on the subject too. Idk a bit of google yelded things like
this or
this or
this.