Go into your settings
Go down to general
Tap on Accessibility
Look for Assistive touch and tap on that like this
After turn On Assistive touch You see floaty icon
You basically want to do this way if there’s issues with your volume up button or your power button.
This menu here however we are going to make it to do a screenshot.
Tap on sigle tap
we want to do is look for screenshot tap on screenshot
Tap on icon it’s going to give a screenshot.
Now you can take screenshot anywhere just tap on icon.
Apple remove physical button on its devices iPhone x ,xs and xr. for this reason it’s difficult to take screenshot.
Check this for more information
How to delete all photos from iphone (permanently simply way step by step)
iPhone 11 hidden and secret features+IOS 13 must try this.