The iTunes app for Mac computers was discontinued and replaced when macOS Catalina was released. It cannot be installed on Macs that are running Catalina or later.
Functionality that used to be in the iTunes App on Macs is now in the Music app, Finder, and other apps.
You can use Finder on a Mac running Catalina or later for the following.
If you want to restore the phone to factory settings, see: Restore your iPhone, iPad, or iPod to factory settings - Apple Support
You can restore a backup from Finder or iCloud (depending on whether you made the backup on a computer or on iCloud). See: Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
If you forgot the passcode see: If you see a iPhone, iPad, or Apple Vision Pro unavailable message or Security Lockout screen - Apple Support
If that is not anoption, you will need to use a computer. See: If you forgot your iPhone passcode, use your Mac or PC to reset it - Apple Support