By some other metrics, I'm better, and I could still run circles around most younger programmers in terms of architecture/system design.
But it absolutely has an impact.
I also used to type a lot more code, as in, my fingers used to type a lot more, I can't physically afford to do that now because after a certain threshold I can feel it in my fingers, and that feeling is not good.
I'd say that even my capability to stay focused on a specific issue has kind of changed, but maybe that's just a me thing, related to my specific life choices/environment, I couldn't tell, maybe some other programmers who have the same age as I do are better at keeping focused, or at least as good as they were 15-20 years ago.
That, plus a healthy dose of “good enough”, along with a whole lot of “I’ve written this 5 times already” lets me get easily maintainable stuff out the door more quickly than when I started.
If I were hiring, I’d vastly prefer current me to younger me.
Late nights are often a bad idea anyway. Though I literally just finished a successful all-nighter about an hour ago, I try not to make a habit of it. And there's a ton of things we know how to do, so that most all-nighters never need to happen.
Regarding typing, it might not be a "this is my life now" thing you just have to accept and work with, but there might be some practice/nuance or environmental factor that you can change for big wins. You can look into typing/workstation ergonomics, and experiment with the many variables, to see what works for you. I had to do that in my late teens, when most of our development team on a stressful project developed hand pain and worse, and learned what worked for me. Now I can type all day and night without problem. Having that known-good baseline means that I soon know when I start doing something that doesn't work for me. (Last time was a few years ago, when I started using a laptop with a numeric keypad at a startup, and hand started hurting. I think probably because hands had to twist badly for the way I was balancing the laptop with the off-center main keyboard. So I switched that work to a laptop without an off-center keyboard, and problem disappeared.)
Regardless, it's a massive toll on my mental health. Although frequently assured otherwise, I constantly feel like a burden on my team, like I'm unreliable, for being unable to put in the same hours my older coworkers do. As difficult as it is to start now, focusing on developing my physical health is the only way forward.
Personally I'm trying to watch less youtube. When I want a break from work, I try to go read a book for a while instead of taking the "mental junk food" option. I can't provide an objective report on whether measures like this help, but they do feel better.