UUID in Project.toml

In a Project.toml files, the structure is a series of rows containing Module name and UUID. For example:

ArgMacros = "dbc42088-9de8-42a0-8ec8-2cd114e1ea3e"
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"

This Project.toml file was created under Julia1.8. I now regenerate the Manifest.toml (after removing the previous one) under Julia1.9rc2.

What exactly does the UUID refer to? A specific source version? How does one upgrade to the latest package version? Use the update command under the Pkg manager? Thanks!

The UUID is the same as you can find in the Project.toml of respective dependency and refers to the package itself. The reason why there is an UUID is that Pkg is designed for the possibility of multiple packages with the same name; i.e. the UUID is the identity of the package.

No, the specific version is encoded in the tree-hash field in Manifest.toml.

Yes. However, if there are conflicts among the dependencies you might end up with some which are not the latest version. (This also happens if your own compat does not allow the latest version of some dependency.)