To take a screenshot make sure you’re simultaneously pressing and holding the up volume button and the side button (power button). If that fails to produce a screen shot you can try a forced restart. If after the forced restart you still cannot produce a screenshot, please contact Apple Support.
You need to have Apple perform diagnostics on your iPhone. It can be done in person at an Apple Retail Store or at an Apple Authorized Service Provider. You can also contact Apple Support and request remote diagnostics.
If you’re in the US please call 1-800-MY-APPLE or outside the US, consult the support articles below. In Canada call 1-800-263-3394
Contact Apple for support and service - Apple Support
Genius Bar Reservation and Apple Support Options - Apple
Explore Service Locations
Official Apple Support