When I was in kindergarten, I got in trouble in class because the Lego airplane I was building fell apart, and I yelled out "Damn!". The thing is, I didn't know what I was saying - my parents hadn't yet taught me what the word meant, and were very careful to never swear in front of me. I think I picked up the word from Geordi La Forge on TV. At the time, I idolized and tried to emulate him.
I vaguely recall a scene where something was going wrong with the Enterprise, and Geordi was standing at a computer terminal trying to fix it, maybe in Engineering? Things weren't going well, so he said the word. What episode could this be? I was in kindergarten in '91-'92, it could have been a rerun though.