Semantically speaking, the nightly build versions are based on the latest (officially) released version.
Even though a version with -SNAPSHOT suffix is regarded older than a version without the suffix:
2.0.0-M5-SNAPSHOT ... older
2.0.0-M5 ... newer
We don't use the -SNAPSHOT suffix with our nightly builds, so the order is inverse:
2.0.0-M5.20201027-0402-8ad3db2a ... newer
2.0.0-M5 ... older
Although Nexus automatically adds timestamps when deploying artifacts with -SNAPSHOT suffix, unfortunately these timestamps don't include a shaID.
Concluding:
When ever a new official version is released say 2.0.0-M5, then the follow up staged versions are based on this release eg. 2.0.0-M5.20201027-0402-8ad3db2a.