There was some trial runs for cg generated ships in TNG but they didn't look great so models were used instead. Was a video on YouTube a while ago showing some of the test footage for cg ships, needless to say with it being the 80s and a tv budget they looked incredibly basic.
Yeah, they very quickly gave up on the idea when they realised how primitive the CGI was going to look back then. Though even today, physical/studio model shots when done well are still far, far superior IMO to CGI for stuff like starships. You get a sense of...I guess
mass that you just don't get with the CGI stuff. Mostly I think because CGI frees the VFX people up to make ships do much more complicated manoeuvres and they go overboard with it
I'll hold up the battle in the Mutara Nebula from "Wrath Of Khan" as my prime example. Watching it genuinely gives me the sense that these are two large, heavy vessels pounding the snot out of each other. They aren't speeding around, doppler-effecting all over the screen (with an IndyCar engine note...) like some fighter craft from the Star Wars universe. They're circling each other, trying to get a firing solution in order to **** the other one up but good (skip to about the 6 minute mark for the battle to start in earnest).
Oh, and as a counterpoint to my example before someone else says "but JRS, what if studio model shots
aren't done well?"...yes, there was indeed Star Trek V. ILM weren't available when that was being made, so a different VFX team did the model work. And
boy does it show. Compare the above ILM work on II to this slight mess