Method 1 Using iTunes
1. Plug your iOS device into your computer.
2. Launch iTunes.
3. Click the button for your iOS device.
This can be found to the right of the library selection menu at the top of the iTunes window. It may take a few moments for it to appear if you’ve just plugged your device in.
4. Click the “Summary” tab. You’ll find this option in the menu on the left after selecting your device.
5. Click the “Serial Number” entry. It’s in the top section of the “Summary” page. Clicking the serial number will switch to the UDID.
6. Right-click the UDID and click “Copy”
7.Paste the UDID wherever you need it
Method 2 Without iTunes
You will get a prompt about the website trying to download a configuration profile. Make sure to Allow it.
3.Go to Settings -> General -> Profile -> Get Your UDID.
4 Tap the Install button located on the top-right corner. You will have to enter the passcode of your iPhone for confirmation purposes.
5.Once the profile is installed, you will be automatically redirected to a Safari window that will display the UDID of your iPhone along with its product name, iOS build number, and serial number. You can copy the UDID from here.