This is only what I noticed about myself: the first step to getting out of a rut seems to be... taking any first step.
What I mean is: usually when I end up in a rut, it's because I had been getting into one for a while and only finally noticed. At that point, the rut is usually starting to get baked into a daily/weekly habit. To get out of it means refocusing on things that matter to me: fulfilling personal relationships, family, personal health/growth, intellectual curiosity, and career growth, not in any particular order, and usually I have a decent idea of where to start, but the rut keeps me from starting.
So getting out of the rut involves taking that first step. The second step becomes easier, then the third becomes easier, and so on. It takes extra willpower but I find that it works as long as I remind myself it's worth it.