My old iphone 5S won't erase its old content?

I recently found my old Iphone 5S and I wanted to erase all of the content and settings. I imported all my old photos onto my computer and was ready to erase everything. I tap erase and it told me I needed a pass-code, which I do have. I entered it and it said I had 9 failed Pass-code attempts, And I was using the only pass-code for this phone. I knew it was correct because it had allowed me into my phone. So I decide to change my password and I still got the same response and now I have to wait an hour to re-enter my password and try again. Am I doing something wrong?

Put it into Recovery Mode by holding the home button and the power button at the same time. Then connect it to the computer with USB. ITunes will offer to restore (erase) or update the phone.

Apple Support: "If you forgot the passcode for your iPhone, iPad, or iPod touch, or your device is disabled"