There are long established ways to reduce the incidence of stupidity. Always using checklists, always getting a weather brief, establishing personal minimums, etc. Of course, all of this will be covered as a standard part of any flying safety course.
IMO just saying "avoid doing stupid things" is dangerous. It's too easy to take that advice and say, well, I'm obviously not stupid, so I'm safe. And then you fly into a thunderstorm or stall while turning final or forget to connect a control surface, because avoiding stupidity has little if anything to do with being smart.
You can definitely stack the odds heavily in your favor, but it takes a lot of effort.
I'm actively working toward my PPL now but let's not pretend it's a safe venture by any means. You're strapping yourself onto a single lawn-mower engine that was build in the 60's that someone bought for $20,000 five years ago.
I guess in both cases, we believe we have improved the odds, but also in both, we don't know how much.
There is the additional problem that our efforts to improve our own safety may be less airtight than we imagine.
And, on the flip side, it's unlikely that another plane is going to run into you but you're probably a lot more exposed to events out of your control such as unexpected weather (e.g. crosswinds) and mechanical failures with serious consequences in a plane than in a car.
What's more unpredictable: stupid human drivers, stupid robot drivers, complex mechanical machines, or weather? Who is John Galt?
That may sound like flying is considerably more dangerous than driving, but this is an overall statistic. Most GA accidents happen because the pilot did something stupid like taking off without enough fuel, or flying into weather they weren't equipped to handle. So if you avoid doing stupid things, you can stack the odds considerably in your favor. The risk of flying can be comparable to the risk of driving.