I think nerd -> believes in science. Science -> requires honesty, curiousity, humility, persistence (i.e. admit you are wrong, accept you losses).
Generally I'm not sure you'd be considered a nerd if you weren't too honest for your own good. Not that this covers all types of virtuous behavior - there do exist nasty scientists. (And there is some level of fraud/dishonesty in academia, too).
I wonder how personality forming it is, being a curious kid growing up hacking on computers. If you don't get what you expected, it's almost never the computer's fault - it means you did it wrong, and need to reconsider. There's no excuses and no dumping responsibility on anyone or anything else.
I have the feeling it probably teaches you something, or at least it should. Something not too unlike epistemic humility, maybe.
As a kid, that's what I loved about computers. They were fair in ways society wasn't. The rules were clear, and breaking the rules resulted in badness. Unlike grade school, for example, where the rules were always changing and badness would just occur randomly and capriciously.
The mistake comes with the very first arrow. You don't have to believe in "science" to be a nerd. You have to be passionate about technology. And that's a very different thing.
Most of the scientists I know can spend years of their life pursuing a hypothesis that turns out to be wrong, shrug their shoulders, and dive back into it. Technologists are all about output. If it's not outputting, you have to give up and seek a different avenue. Scientists (except the very famous and successful ones) tend to be humble and curious. Technologists less so.
You are confusing “nerd” and “geek”, historically.
Both terms are overloaded, because neither has been used with any consistency. Like the long forgotten trekkie/trekker divide, it was a way for some people to feel superior to other people, but the lines were never clear.
Musk is a fascinating example. Incredibly hard working, visionary, detail oriented. Without him we'd probably not have had reusable rockets for another generation or more. With Tesla he also accelerated electric car adoption. He was also brutally honest about their chances of success, when pitching SpaceX to the other initial investors he gave it a 10% chance of success. He was little more confident about Tesla, saying the main objective was to prove the concept and push adoption across the industry. Yes he's famous for giving absurdly short time scales for advances like "full self driving", and this is reckless and irresponsible, but I think he genuinely believes what he says at the time.
Yet he's also a sociopathic fascist arsehole. It turns out these traits are not all on the same axis.
Makes sense at first sight
But then you see people with very questionable morals having made a key discovery or having produced a fundamental technology. Reality is complicated