This is a special awk variable which holds the number of fields in each line (NF=="number of fields") and is automatically updated for each inputline. So since in awk fields are numbered with the 1st field being $1, the second $2 etc, because NF is the number of fields, it will be 3 if there are three fields. Therefore, {print $NF} prints the last field.
This will be enforced starting from January 20, 2022 and onwards.
This is a notice regarding releases of Ubuntu that will be reaching, or have reached, the end of their standard support period. These releases are no longer on topic effective the above enforcement date.
The following version of...