They both have 1024 MiB of RAM. There isn’t a difference in what DigitalOcean assigns to the droplet.
The “992 MiB” total RAM figure could be uncharitably described as a lie. For some reason i don’t know, the kernel excludes certain memory that it reserves for itself from the “total” number. But it’s still there (and probably assigned to something).
So, Debian and Ubuntu probably have slightly different figures because they’re probably running significantly different kernel versions with significantly different settings. (Maybe one of them’s even 32-bit.) The numbers will probably change slightly as you upgrade the kernel in the future.
You might find the command “
dmesg | grep Memory” interesting, but i couldn’t explain what all of the numbers mean.