I believe Trelane is seen an Andorian by most suffering the delusion. I can’t tell if they still see him as such after the illusion is broken, but that may add to the confusion and prevent Spock from recognizing him.
Also, this moment was awkward and notable for Spock, but not so traumatic that he’d have Trelane’s voice and mannerisms flashbubled in to the extent he could recognize Trelane several years later, especially considering on the Enterprise, you’re encountering an all-powerful being every month or so. It’s probably hard to remember, “this one’s childish” or “this one’s feisty.”
Now the big question is… why couldn’t Trelane cause a mass delusion to make people play soldiers or something when they come across him in TOS? It’s possible that similar to how the continuum can limit Q or Q2, they limit Trelane.
Which leads me to a theory… if as implied in Picard, the Q aren’t entirely linear, what if this makes it possible for Trelane and Q2 to be the same person? The father over shoulder for all eternity thing certainly matches up.
Although, I do think it’s a bit too early for Memory Alpha to go declare Q is Trelane’s father.
You can self-sign and self-enroll secure boot keys. Can’t say it’s an easy process, though - I had a lot of misery with it on my Surface Go 1st Gen. Might be better on my Thinkpad.