I got a new military ID 5 years ago and it was different than the one that was replaced in that it doesn’t have my SSN on it. Instead, it has an ID number of some sort.
A couple of years ago I had to get a new CAC Card type retired ID because of a change over in ID cards required to get on military bases. And like you, it had a unique DoD ID number that replaced the SSN as well as a chip, barcode and magnetic strip. With it, when I go through the base gate the guard scans the barcode and it gives him a code that verifies the validity of the card and my authorization for access.
Got a new one last Year only change was SS Number