I want to add an iPhone XS UDID in the Apple developer portal but I am unable to find the UDID in iTunes and without adding the UDID I am unable to run my app on the iPhone
You can compile the UDID from the ECID that is shown by iTunes with the following formula (for XS and XS Max)
0000CHIP-00ECID
The CHIP version in the XS/XS Max case is 8020 (source for it)
So if you want to compute the UDID for an XS/XS Max (and I believe the XR has the same chip), then you'll need to replace the ECID with your own in:
00008020-00ECID
To find the ECID, connect the iPhone to iTunes and click the serial number, the ECID will show up.
Edit: For the XR the formula is: 00008020-000ECID, because the ECID has one less character