How long does a frame last?

How well have you looked after it?
How often and hard has it been ridden?
Are you the only owner?

If it's only been ridden on good roads and maintained well it should be fine. If you've been racing around on gravel roads like a lunatic be careful.

Main things to be careful of are the fork crown/steerer tube join, headtube around the headset - top and bottom - and any cracks around the bottom bracket, seat tube, chainstay and especially headtube joins.

If you're reluctant about anything get it inspected by a reputable shop, but I've seen people riding well maintained bikes from the 80's and 90's a fair bit lately. As long as the frame is in good condition then you can give it a new lease of life with new wheels and groupset, if you check the GCN Tech channel on YouTube they've updated and repurposed a few older bikes lately and could give you some ideas.