Your trajectory is far from "non-standard". Many of us in the IT space have come from a physics or maths background, not the least because some of the IT-related skills you almost inevitably pick up in these fields of science is numerics / applied maths. Which helps hugely with the more data-driven areas of IT employment.

I've started my IT career as a student sysadmin (at an institute of applied physics) in the 90s ... and in these near 30 years, not yet managed to set aside the time for a multi-month career break or sabbatical - in spite of being a few years into my eighth employment since. And no, I've not remained sysadmin all these years; done development in multiple areas and using different programming languages and environments, done project and people mgmt and sysadmin - with more than one back-and-forth. I would not say I have "found" my zone of comfort that I'd like to stay in ... and am often asking myself if I'd be more content had I stayed in physics, or academia, or both. And whether I'd really like to continue with the grind.

If that sounds resigned to you, then that's on purpose. Let me say though that realizing "I don't like all IT jobs through the bank", "this job appears to be pointless", and that introspecting yourself stops at the barrier question "am I / have I actually done the right thing?" is absolutely normal. If the IT World, as employer, can be characterized with a single word then I'd choose "fast-paced"; trends develop overnight and things become possible today that appeared intractable yesterday. Technology becomes deprecated barely after it shipped, methodologies you learned and liked go out of fashion. Or else you discover and introduce one you like and it quickly evicts what tied you down before. Fully agree that this onslaught can overwhelm and trigger anxiety. The feeling of being unable to follow. Or the cynicism of noting that it's only a reoccurance of an ancient tech that you had thought dead in the ditch ... ten years ago.

It can be very refreshing to join a startup or younger company in this context - once you rationalize that it will feel as if you're the left-behind, the grumpy greybeard, oldschool, and that you'll have a lot of these cynical "been there seen that don't ask" moments. Live through them and observe. Then turn the "duh" feelings into action - and nudge the colleagues. Ask them why they try what seems a dead end to you. Give them examples to broaden their horizons for side effects, or to exploit opportunities to catch value from low-hanging fruit they didn't see. This way, you may capture the spirit. Younger colleagues generally actually like this approach. Because it doesn't "put them in their place" (as in: I know so much better and you noob should listen to me greybeard), but instead broadens their horizon. That they prefer Rust and you C++ doesn't mean you can't read their code and point out their implementation does an O(N^3) where a well-known library provides O(log(N)). Is this purpose ? To use your experience making others more productive ? To treat the company a little bit like a parent would their children, with goodwill, help it grow, help it develop, in ways that go beyond what a project deliverable done "to-spec" would ?

As far as "purpose" in the wider world goes, what matters to you most ? Money ? Environmental issues ? Human Interaction ? Peace ? Safety+Security ? International Politics ? Equality or international development ? Whatever it actually is, right here right now, few areas of employment are entirely devoid of IT involvement. And if you wish to remain "close" to IT but not quite right on a developer job, there's Data Science, IT Training, People or Project Management to try out. Or even "manual labour" - chip making tech, hardware engineering.

What I'm saying is, phases of burnout, reaching the point where you don't like "the job" anymore will always happen. The best boss can't make up for a company that bet on the wrong product and is circling the drain. The fastest-growing company won't offset personality clashes, say, the fact your boss is a fake-till-you-make blender and you're not (or vice versa). The coolest benefits and huge pension contribution may (not) balance out the iron-fisted run-by-the-book bureaucracy.

Don't despair - dare to move. Internally, externally. Sometimes, a step-back can be a leap forward.

Start joking about your grey hairs !