Drawing players into your world, and making them care about what is going on and what they can do in the game is a trick harder to pull off than most give credit for. Showing all the ways PCs can interact with a Table Top RPG world that they can't in a videogame, book, or other type of escape into the fantastical is perhaps the largest strength that RPGs have. And one of the ways to play into that is to reward player investment.
By this I don't mean giving the players tons of free stuff. However, it does mean that when a player shows interest in something you want to engage with them on it. Any sign of interest is worthy of some engagement, and if you do it and reinforce it enough your players will feel like the game is more responsive to them. You caring about what they care about will make them care more. And that will make the game better.
The thing I am not sure everyone gets though is that this needs to happen in big and little things. And often it needs to happen in little things first so you can build up the engagement and trust where players will try to get involved or make changes in big things that maybe you don't expect.
You can't expect to have PCs be open to a Heel/Face Turn from a villain - or that they can make one happen - if everytime they try to de-escalate fights and make peaceful solutions gets shut down. And PCs will generally try that stuff on smaller encounters first because the expectation is that larger encounters will be more scripted as set pieces. But if you let them do it in smaller encounters, reward their creativity and investment in finding alternate paths, they will continue to do it and try it and see where things go.
The same can happen in non-social things. Players will interact with the world more, the more that interaction with the world 'pays off.' And paying off in an RPG sense is engagement from the GM and for the thing.
As an example of this, one of the happiest parts for me from my last session of a game was the druid player looking into harvesting some bioluminescent moss and seeing if they could druid craft it. The moss is never going to be a god weapon, but the player had ideas for it, and I played into it. Now they have plans to use this small thing thrown in as set dressing to improve the look of their character and do other things.
A small bit of engagement is now turning into more stuff for this player. And other PCs also saw it, so now the task on me is to watch for where their engagement goes in things, how to reward that and continue pulling on it.
Do it right and your sessions can write themselves at times because you won't have an idea what happens next but your PCs have 385 plans and things they need to do. And that's a great thing to have.