To start with, "Senior" and related titles basically mean a person who doesn't need much hand-holding. This might be related to time spent, but often you find there's a lot of variation.
People I consider senior software engineers have a can-do-anything vibe about them. They have a wide range of skills in the field, and have that T-shaped experience profile: there's some area they seem to know everything about, and then they somehow are able to say something sensible about a whole lot of other areas. For instance I worked with a guy who wrote financial exchanges but could also write a modern front-end, understood how kubernetes worked, and knew a fair bit about databases. You couldn't throw out a term that he couldn't place (X is a language / framework / pattern / OSS project), and you couldn't come up with a problem that he didn't know the closest well-known adjacency for.
That's a vague outline of what I think a senior dev is.
To get there is a long story. I think you need the good fortune of not being siloed in something very specific or superficial. That might even include having the "good fortune" of being forced to change jobs a few times. You also need some luck in your personal life to be able to explore a bunch of stuff in your own time, plus some funds (probably less relevant today where everything is an online service).
People I consider senior software engineers have a can-do-anything vibe about them. They have a wide range of skills in the field, and have that T-shaped experience profile: there's some area they seem to know everything about, and then they somehow are able to say something sensible about a whole lot of other areas. For instance I worked with a guy who wrote financial exchanges but could also write a modern front-end, understood how kubernetes worked, and knew a fair bit about databases. You couldn't throw out a term that he couldn't place (X is a language / framework / pattern / OSS project), and you couldn't come up with a problem that he didn't know the closest well-known adjacency for.
That's a vague outline of what I think a senior dev is.
To get there is a long story. I think you need the good fortune of not being siloed in something very specific or superficial. That might even include having the "good fortune" of being forced to change jobs a few times. You also need some luck in your personal life to be able to explore a bunch of stuff in your own time, plus some funds (probably less relevant today where everything is an online service).