Learn how to stop your iPhone or iPad from automatically installing random apps and games that you long uninstalled or never downloaded from the App Store.
The two leading causes of random app installs are the Automatic App Downloads feature and bugs in the operating system.
To prevent random app installs, you can turn off automatic app downloads in the device settings under the App Store section.
If you suspect a compromise, you should also review linked devices, change your Apple Account password, and consider enabling Lockdown Mode.