This is called an anthology series
I'd quibble with Wikipedia's definition
An anthology series is a radio or television series that presents a different story and a different set of characters in each episode or season/series
slightly, in that an anthology series could have recurring characters. Star Trek:TOS was such an anthology.
There is a danger with recurring characters, in that the writers of such series often let those characters' backstories and personal problems develop into a continuity between episodes, sometimes degenerating into a full-blown soap opera. This happened to Star Trek: TNG and the later series.