The number you are talking about is the version (release) of the RPM.
So. grub2-2.06-47.fc36
grub2 is the name of the software
2.06 is the version of the packaged software
47 is the version of the RPM package
So the RPM can be updated, but the packaged software version can remain the same as before.
Then, in order to know which package version you have installed you have to query the RPM database.
For example rpm -q grub2