I think there is no doubt that the science in the science fiction of Star Trek in the 1960s was far superior to that found in any competing show. Some "science fiction" shows made no real attempt to have any sort of serious, plausible basis for the ideas -- I recall Outer Limits (who used to matter-of-factly mention scientific wonders merely incidental to the show -- like a planet "one million miles from Earth -- the episode was not about discovering such a nearby world, just saying there was one (almost certainly not knowing how silly this was) -- certainly Star Trek would never do something like that). I also recall one of the cast members from Gilligan's Island, not a science fiction show I realize, mention that Schwartz, the show's producer insisted that the science on the show be accurate and I could scoff at that even as a youngster. But STOS had its lapses -- like in Spock's Brain, Scotty was impressed that the ship of the brain-stealing women used "ion power" which is of course far less advanced than a warp drive. At the same time, ion propulsion is a real thing -- so presumably that idea, pretty esoteric in the 1960s, came from a technical advisor who indeed knew some physics/engineering. Nowadays (in later incarnations of Star Trek) I suspect they are getting advice from phd-level scientists -- who in the 1960s was providing technical advice to Star Trek? I find very little online about this. I suspect the writers often used encyclopedias or got ideas from science fiction books. (I recall an article in The World Book about building a model rocket powered indeed by ions and I would be willing to bet that this is in fact the source for the ion-power of the Eymorg.)
Scientific American Article states
Nevertheless, the makers of Star Trek did try to get things largely right and reasonable, starting with the first pilot episode, “The Cage.” Roddenberry contracted with Harvey P. Lynn, Jr., a RAND Corporation physicist, to provide technical advice for a nominal fee.