How do you come up with a plot?

I've only ever ran modules and "light" campaigns; right now, I'm running a campaign set in the world of Old School Runescape, which is fun, but very comedic and mostly just based on going about doing quests. That's fine, that's the point of the campaign.

Soon, though, I want to run something more traditional, with bigger stakes, more serious moments here and there, and more genuine heroics. But like. How!

I have ideas on how to run all these different kinds of scenarios, and I can make NPCs, and design dungeons and quests, but... how do I link it together? How do I make a BBEG? What's the overarching point of it all? I draw a blank every time!

I know the process is different for everybody, but some ideas would be a big help!