The secret is to not work from what you'd like to do, but to work backwards from what your players want to do.
Seriously, throw out all the prep you have that isn't landing, and just ask your players what kinds of things they want to do. Then, make stories inspired by the actions or accomplishments they want to undertake.
... This does require that your players have some idea of what they want to do, though. If you have checked out or uninvested players, there's essentially nothing you can do I'm afraid.
So now I will soapbox to the players reading this: Your job is to be invested in what the DM wants to do. If you don't put energy into being invested, you're not fulfilling your side of the arrangement at the table.
I recently had a player tell the group they were afraid of pursuing things because they didn't want to waste the group's time. I'm like who hurt you.
I mean, you do have to read the room a little and if you're the only one that wants to go to the knitting festival maybe sell it harder or yield. But just quietly being unhappy isn't fun for anyone.
Over the years, I’ve found it’s less helpful to think of the campaign as a planned road trip - and more helpful to think about it like you’re in a car chase and your brakes have been cut.
Don’t plan out meticulously, just prioritize steering into the next interesting thing that can happen, ideally one that the party is already kinda heading towards. You can have some ideas about things that could happen afterward, but you have no idea what your players will do yet.
They could befriend the lich’s minions, commit the crime before the villain has a chance to, or just straight up die to terrible luck.
Tremendous advice from The Alexandria echoes what other folks are saying here: Don't Prep Plots.
Basically, prepare scenes and think of what is going on outside the frame (basically, what are the NPCs and factions up to while the players enjoy their shopping trip?). That helps you avoid overthinking it and wasting prep time. It also makes the world more responsive to player actions.
I have a piece of counter advice that allows you to on occasion plan a plot point. Generally your PCs are most invested in their beloved NPCs, either from backstory or the plot you've developed. If you have a cool idea, these NPCs can often be inserted into it and offer exactly what the players enjoy.
When you got these awesome ideas for the next big thing that should happen in your campaign and when you get to the table and actually realize you have no idea how the group is supposed to get to the thing organically.
A lot of the advice here overlooked that you can come up with an idea that you know your players will enjoy. It is fantastic advice to build content from your players' desires outward but you can seperatly come up with a fantastic idea independent of your players that they'll really enjoy.