Hello khan_shayan,
Thank you for using Apple Support Communities. We want to help you with your iTunes issue. Allow us to assist by recommending some troubleshooting steps to help out. The following resource has more steps you can try: If your computer doesn't recognize your iPhone or iPad - Apple Support
1.) Update the software on all devices: Update your iPhone or iPad
2.) Connect your device directly to your computer. Make sure that your device is unlocked and showing its Home Screen, then use a USB cable to connect it directly to your computer. Don't connect to a USB hub, display, or other device. If that doesn't help, disconnect your device and all other USB devices and accessories from your computer. Then reconnect only your device.
3.) Trust your computer, if asked. If you see a “Trust this Computer?” alert on your device when you plug it into your computer, tap Trust. About the 'Trust This Computer' alert
4.) Restart your devices: Restart your iPhone
5.) Try a different port, cable, or computer. The issue could be related to your computer, its USB port, or the USB cable connecting it to your device. If possible, try a different computer, USB port, or USB cable. Also check for any debris in the charging port on the bottom of your iPhone or iPad.
If your issue continues, you can even test this issue in safe mode. This step can help isolate possible software related issues: Use safe mode on your Mac - Apple Support
If you're using an Intel-based Mac
If you're not using a Mac with Apple silicon, you're using an Intel-based Mac.
1. Turn on or restart your Mac, then immediately press and hold the Shift key as your Mac starts up.
2. Release the key when you see the login window, then log in to your Mac.
3. You might be asked to log in again. On either the first or second login window, you should see ”Safe Boot” in the upper-right corner of the window. If you can't start up in safe mode, make sure that your Mac isn't using a firmware password.
Depending on your results, follow the steps under “If the issue continues in safe mode” or “If the issue doesn't continue in safe mode”.
We hope these steps help you. Thank you for using Apple Support Communities. Take care.