From what I read it's thought that kids being vaccinated (a good thing) have reduced adult exposure to the virus, decreasing the immunity we received from being infected as children.
[1]: https://www.cbc.ca/news/canada/nova-scotia/shingles-under-ag...
I was unlucky that: a) I hadn't gotten vaccinated yet; b) my immune system was not just declining, but I actually had CVID (Common Variable Immune Deficiency) and didn't know it when the shingles outbreak occurred. Even though I took antivirals, the shingles kept reasserting itself. I still have live virus in that eye 6 years later, though at least it is not continuing to scar my cornea like it did the first year.
I personally wouldn't recommend getting vaccinated under 50 for a couple of reasons:
1) your immune system has not yet started declining in your 40's, so it's less likely that the dormant herpes zoster virus will come out of its slumber. Your immune system is still keeping it in check, unless you are highly stressed or have some immune system deficiency. If it does pop out in your 40's, you are more likely to have a mild case because your immune system is still strong (usually).
2) the Shingrex shingles vaccination (the modern, dead, 2-dose vaccine) provides 89% protection for up to 10 years. It is an open question how much protection it provides after 10 years. Getting it before necessary may increase your risk for getting a bad case of shingles in your 70's to 90's.