Anthologies and series are really two different kinds of shows. As a series, committed to a repeating cast and setting, Star Trek was the best series. Twlight Zone was the best non-realist anthology. But it had plenty of dogs and tough competition from The Outer Limits.
TZ indeed had lots of SF but more was fantasy or fable or allegory or even surrealism/absurdism. The Outer Limits was committed to a SF mode of storytelling but focused more narrowly on the horror genre. So technically, Star Trek wins as the best SF
But it's all moot in one sense, because opinions are not created equal. No one is required to bother to exercise the best objectivity they can when making this call. As a result, nostalgia trips are mixed in. If Twilight Zone were being broadcast now
people who like things like Farscape, Firefly and Buffy would despise the moralizing, sentimentality, obtuse lack of self-awareness and general unhipness of Twilight Zone. Or, for that matter, Star Trek. But those shows inspire nostalgia, which is assumed to mean goodness. When Voyager shoe-horned in a Twilight Zone episode into a series format*, very few people liked the results, no matter what. Many specifically and explicitly criticize the "episodic" structure!
(Some episodes that would have been right at home on Twilight Zone, just by changing character names around: Emanations; The Thaw; Innocence; Ashes to Ashes; The Chute;
Remember; Memorial; Retrospect, even 11:59.)