Hi
If you look through this guide you should be able to find the screw lengths you need
[guide|151603|https://www.ifixit.com/Guide/iPhone+X+Rear+Case+Replacement/15160|new_window=true]
This guide if for a iPhone X but the XS and X are quite similar
Also here’s for the 8+ too
[guide|111156|new_window=true]
When the guide talks about taking the screws out it will also say the lengths
Hopefully this helps
Any questions please ask
Thanks:-)