One of the things that Star Trek does best is create a vast universe that is absolutely packed with information, lore, and culture, the forefront of this being both the highly advanced sociopolitical infrastructure created since the show first hit TV screens, and the fairly realistic fictional technology. This technology is, despite some aspects of it being achievable today, high science fiction. They're the wils imaginings of a far-off future, but that is not to say they are not based in real science.
Things like universal translators are based on (granted fairly primitive) real-world linguistic theories of identifying key signatures. Others that are less grounded, such as thewarp drive, are at least consistent within the fictional science framework presented in the show )at least until Discovery aired). Transportation technology, however, is a whole different thing. The science behind this piece of tech sometimes collapses under its own weight from contradicting information presented over the many years. In fact, by following some trains of canon logic, immortality might even be possible.
Star Trek: Why TNG Improved So Much After Season 1
Transporters work by converting a person into an energy pattern, breaking them down atom by atom in a process called dematerialization, and then sending this pattern to a different place («beaming» them), where they are then reconverted into matter in a process called rematerialization. It’s like having a Lego set that is disassembled into its individual parts, sent in a box to another location, and then reassembled there, but on a quantum theory level. Examining the real world since behind the process, it is possible within quantum theory for a quantum particle to move from point A to
Read more on gamerant.com