You can reset an iPhone, even without the password, by putting it into "recovery mode" or erasing it via iCloud's Find My ...
DFU mode can help you recover your iPhone or iPad using a computer.