the sensible trick is to figure out the gameplay first and design the story around it
but it's a lot harder than it sounds:
usually you either have gameplay that is good but very abstract
or some grand epic story that is difficult to break down into levels or bosses 🤔
so my advice is not to worry about perfect balance -
be ready to compromise either if it makes the game more entertaining
and getting it right first certainly won't work - it takes a lot of iteration
and the end result is hardly ever what you had in mind at the start anyway 🤔