Chosen Solution

I replaced the battery and I was able to restore it. I woke up in the morning and tried to test the iPhone again, it didn’t work.

error 21 is a battery fault try the old battery and see if that works

Tried that. Same thibg.