You're up in your own head, and are sensitizing yourself to frustrations you would have brushed off in your (heh) youth. The cortisol isn't helping either. It's also possible that you're just burnt out.
You're going to have stretches where you look back and feel like you're doing the best work of your career, and stretches where you worry that you're done for. It's all normal.
If this project isn't clicking with you, but you have to do it anyways, use this as an opportunity to build some "compensatory" habits. A similar situation (I'm older than you, but this happened in my late 30s) got me big-time into note taking, which has been a long-term win.
You're going to have stretches where you look back and feel like you're doing the best work of your career, and stretches where you worry that you're done for. It's all normal.
If this project isn't clicking with you, but you have to do it anyways, use this as an opportunity to build some "compensatory" habits. A similar situation (I'm older than you, but this happened in my late 30s) got me big-time into note taking, which has been a long-term win.