I disagree completely.
Yes they both "pretend", but there's a very clear difference between Star Trek which pretends all these things are explainable, and Harry Potter which does not. On the face of it, teleporters and floo powder may work similarly, but the framing of how they're presented is important.
I don't even see how this is disputable, a casual glance at fanbases will tell you this. Nobody in the Harry Potter fandom will bother to explain how wingardium leviosa works, or why certain things go into certain potions, while on the Star Trek front you'll find pages and pages of how the stupidest of gadgets mentioned off-hand in a single line in that one episode are supposed to work.
It's disingenuous to pretend science isn't a big part of Star Trek's heritage and appeal, there's a reason a bunch of scientist, NASA engineers and the likes mention Star Trek and not Lord of the Rings as their inspiration...
I think you undersell Harry Potter, and a lot of other fantasy, and even 'real world' magic. There are rules underpinning it, same as the advanced tech in Trek. In Harry Potter you see those rules, and science rules, being use does to further the plot...Time Turners and causality, Horcruxes and their specifics. As long as the underlying rules are consistent, in a narrative sense, there isn't a lot of functional difference. Floo powder is just Scotty and sliders...the fireplaces have to be connected to a network. There's an underlaying conservation of energy principle too...food isn't magicked into being, it's just moved by magic, or configure by it occasionally (making it roughly the same as a replicator.)