Of course, my favorite childhood gift combined the two: Expert Builder Set 8860, the Lego car chassis with working steering, differential, transmission and moving engine pistons. That set is how I learned how the drivetrain in a car works.
I used to build roads, buildings, garages, towns... I'd set up small construction sites, and even try to engineer my own traffic intersections. You can set up hot wheels tracks, and learn about physics. I learned how to take apart the cars and swap out parts on them. Many of the cars became just another Lego as well.
Sometimes the cars themselves are what would inspire me to build a structure to support them out of Legos or Lincoln Logs, etc.
I considered that to be a personal failing at the time.
I still have all of my toy cars (and cases) - and my last recent addition to my "collection" was three versions of the Isuzu VehiCROSS that Hot Wheels put out; I purchased four of them - one out of the packaging, which I keep on my keyboard as a "fidget toy" - and three others in packaging (sadly, one of the colors wasn't "Ebony Black" - which is the color of my VX - I've been thinking about getting another Hot Wheels VX and custom painting it).
I also still have all of my Lego; in fact, I actually still own most of my childhood toys. I don't know how common this is. I've gotten rid of some of them (I gave away all of my Capsela to a former boss' son who seemed to have an interest in such toys - so maybe that kid will grow up to be another engineer in some form). I also still own my first microcomputers, too (TRS-80 Color Computer 2 and 3).
Has anyone else done this? I just wonder how common (or not) keeping such kinds of stuff is...