If you move to the bay area in your 20s, by the time you're in your 40s you will have a specific knowledge of a fad language that is 20 years old. But even if you somehow keep up with new tech in your spare time, you will look 40 something and thus be nearly unemployable solely on those grounds.
And you simply will be unable to save any reasonable amount of money no mater how many beers you don't drink. Like anyone else in the states, your sole savings would be home equity which you won't have because you won't be able to buy any kind of home in the few years your age makes you employable.
If in doubt, for those still in SF, determine the savings of your co workers in their 20s and 30s (who are now near then end of their employability), and whether they rent or own (good luck finding a 50 something coworker to ask). Be aware that you do not leave the bay area rich, you leave it because you can't afford it. And be aware there are few middle aged and effectively no old people there. And beware that 45 is only half way to retirement age.