Okey, I agree with you that practically this is not possible but if that ever happens what will happen with our science and technology? Internal conflict over the century slowed down our technological advancement. If there was no conflict between different human races then the achievement of humans over science and technology could be more advanced. Maybe we could colonize other planets by now.
If you look at the last century there were two world wars that lasted a total of about 10 years, and a few more conflicts like the Vietnam and Korean Wars - but all this together with the consequences of those wars would not take us much further in science and technology from where we are today. Some might say that there would not have been such significant advances in space technology had it not been for German scientists working on various
advanced technologies during World War II, and those same scientists were then recruited (or captured) by Americans and Russians, with the former snatched better prey.
If there were no conflicts in human history (over the past 5000 years) and if all nations worked together, the world would surely be a better place to live - but far from colonizing other planets, it is a very complex thing that will not happen for decades - in the sense of mass colonization of the Moon and Mars.
AFAIK they use credits and some form of transactional exchange in starfleet. I can't find the screenshot. But there is a scene in one of the trek TV series where there is a readout for "medical credits" in sickbay.
Mention of it is omitted. Its a thing where no one is certain exactly how money or the economy works in star trek so its never shown.
It is true that there are credits for replicators or for the use of holodecks, but as far as I know only on their spaceships and stations in order to ensure that everyone has equal access to resources and does not abuse them. However, I am not aware that there are medical credits - health care is completely free for everyone. Interestingly, I found an article that even mentions Bitcoin in the context of Star Trek - a very interesting read for those interested in the concept of a non-currency-based society.
Stewart: When Gene Roddenberry was coming up with this universe and this concept, things like Bitcoin didn’t exist. What do you think he would have made of that? Does that fit into this concept at all?
Saadia: I’ve always wondered if there is an accounting unit of some sort to keep track of what is being made and what is being produced.
Stewart: You mean, like a federation accounting unit?
Saadia: Yeah, an accounting unit. Not a currency, but something to keep track and account for the allocation of resources. But we don’t see that in “Trek.” These are the parameters of the world. I’d be very surprised that the next Picard show would be about accumulating artifacts.
Stewart: Suddenly he starts carrying cash.
Saadia: Or Bitcoins.