To take a screenshot of Google Pixel XL 2, press the Power and Volume Down buttons together for a second.
As a result, the screenshot will be placed in the gallery. After that, you can use the image to share it on social networks, instant messengers, or keep it as a photo.