iMazing can analyse your backups for signs of compromise like Pegasus, but the nature of iOS means that there's no spyware scanners in the way that you would get on a desktop as the operating system doesn't permit them .
If you are concerned a restart of the phone will purge anything from memory and reload from the signed iOS software image, eliminating the highly unlikely chance you have a compromise