Take my answer with a grain of salt because it's just my own speculation.
If I visit the iCloud website I don't see People, Places, Memories, but I see those labels in the Mac app and the iPhone app, so my guess is that those data are stored on your devices, and the recognition is being performed by the A-series processor on the iPhone and the T2 chip (?) on my Mac, but those data are not stored on iCloud, from the iCloud website I can't even get any information regarding the pictures, so I guess iCloud is just storing the file.