Hello jairojavirer,
There are a couple of ways to end a Guided Access session. We recommend reviewing both before attempting to restore your device as a restore will result in data loss of any content not already backed up: Use Guided Access with iPhone, iPad, and iPod touch - Apple Support
"End a Guided Access session
Triple-click the Side or Home button, enter your Guided Access passcode, then tap End. Or if you turned on Touch ID or Face ID for Guided Access, double-click the Side or Home button."
If you continue to experience an issue with disabling the feature, or getting the correct amount of clicks to register on your buttons, there may be another issue. In that case we'd recommend reaching out for additional support. You can review options available in your region here: Apple Support
Take care.