By a series of fortuitous accidents.
I graduated in the early 1980's with a degree in chemistry, but had no desire to work as a lab rat and in any event the UK was in massive recession so jobs were scarce. I got an opportunity to work for a local Structural Engineer as a sort of office/site dogsbody. I stayed for a couple of years. Learnt the basics of drawing and other office based activity and spent lots of time on site measuring things and prodding old steel, concrete and timber structures. I enjoyed it.
I went back to college and did a Masters degree in Metallurgy and concentrated on corrosion. During that time I also worked for a corrosion consultant as what would now be called an intern. At the end of my masters I went to work for them on projects related to civil engineering. A couple of years later I got the opportunity to work for a big firm of global engineering consultants, that was 33 years ago and I am still there enjoying the ride. It is wonderfully varied, no two days are the same and I have worked some fantastic projects over the years. To pick up the point Ironic made, I think my job aligns with the way my brain works for sure.
A cautionary note to end on, back when I was doing chemistry I had an interest in electrochemistry and batteries. I did explore a career in battery technology. All the advice was stay away, it is a mature tech with no future. I think we can all probably agree that advice was, in hindsight, poor. I don't regret the decisions I made, just be careful with the advice you take and be wary of the crystal ball gazers, the ball is probably opaque. Best of luck.
Cheers
GG