Doubly so where security is concerned. You used to secure something by knowing all aspects of the application...you knew the OS, the software, the firewall rules, you had a small batch of logs you could conceivably review.
Now it's fully automated and just....goes. A deceptively small action produces a substantial result, 99% of it being abstracted away.
This works because, even though many of our projects are new, they're still very much "legacy" in the way things work and the languages and tools used. You could explore employers who have those kind of legacy systems that you have expertise in. Either to help extend their useful life, or to help dismantle them and migrate to a more "modern" (whatever that means to them) system.
As I grow older, I'm not any dumber or less wise, but I'm definitely far more aware of what I don't know.
Additionally, technology systems are getting more and more complex, which exacerbates the feeling. This is a big reason why I focus hard on and continually revisit the fundamentals. Being an expert on the fundamentals of systems will save you.
I just try to stay fit with exercise and nutrition, get plenty of sleep, and do what I can. Mentor where I can, and also learn from the youngs and learn their perspectives.
And I don’t beat myself up over any perceived shortcomings.