The original Star Trek series was an anomaly on television in the late 1960s, both for its inclusivity and the way it excluded a common vice of the day. By the time the franchise returned for Star Trek: The Next Generation, Gene Roddenberry's fictional view of humanity continued to evolve and improve, often in ways he himself couldn't. Perhaps this is why, starting with The Next Generation, the characters no longer drank alcohol but instead drank something called synthehol. What exactly is this sci-fi booze and how it works are ill-defined, at best.
Source:https://www.cbr.com/star-trek-synthehol-fake-alcohol-explained/