In more detail
Version 4 UUIDs are random (122 random bits), so two systems can create identifiers independently with a negligible chance of clashing. Newer version 7 UUIDs start with a timestamp so they sort by creation time, which helps database indexes. They are not secrets and should not be used as passwords or tokens.