App Privacy in App Store
Solution 1:
The information is provided solely by the app developer. You will also notice that Apple introduces the section with the following text:
"The developer, XXX, indicated that the app's privacy practices may include handling of data as described below."
There's no automated checking of whether that information is factually correct.
My understanding is Apple does not actively check every app for compliance with what's reported here. Instead, if it comes to Apple's attention that the developer has provided false or misleading information here, Apple has retained the right to remove the app or even all the developer's apps from the App Store.
The threat of being removed from the App Store, as well as the PR nightmare it would cause if false information was provided here, probably works as a deterrent for most developers.