> Star Trek utilises transporters ... because spending days or millennia going from ship to surface or between stars in a galaxy is utterly nonviable for ... television
Transporters specifically were "invented" due to budget constraints on the original series. The original plan was for the crew to use a shuttlecraft whenever they visited a planet, but that proved too costly-- In the absence of CGI, that would have to be done with practical effects, i.e. a model shuttle filmed landing on model terrain. The transporter shots, on the other hand, were really just a fancy cross-fade.
Though you might also consider that landing from the ISS, in low-Earth orbit, takes at least hours presently. This Dragon X capsule landing initiated at 11:05 GMT on 3 September 2023, and was scheduled to splash down at 04:17 GMT on the 4th, over 17 hours later.
With transporters, script writers can bounce characters between locations in seconds.
Regarding the FX challenges: It's common to re-use stock or standard footage for such segments, which already occurs with many spaceflight sequences in Star Trek and related series. With the ability to swap in different backgrounds (using mattes or rear projection in the pre-CGI era) this gains more flexibility. Establishing shots are the equivalent for contemporary or historical terrestrially-based plots, programmes, series, etc.
Viewing television productions with an eye to scene, set, and location cost helps one realise why so many scenes are shot in low-rent locations: car parks, warehouses, docks, drainage canals, desert, etc. (Also typically proximate to major film studio locations as with Hollywood or elsewhere.)
And you can now have new horrible transporter accidents without any cost at all. Just say "What we got back on this side wasn't alive for very long, commander".
Transporters specifically were "invented" due to budget constraints on the original series. The original plan was for the crew to use a shuttlecraft whenever they visited a planet, but that proved too costly-- In the absence of CGI, that would have to be done with practical effects, i.e. a model shuttle filmed landing on model terrain. The transporter shots, on the other hand, were really just a fancy cross-fade.