Factory Reset iPhone without Passcode

My mother has dementia and accidently set up a screen lock passcode. To reset the lockscreen passcode it asks for her icloud email password which she also does not have. I figured out her icloud email after some luck and have no clue what her password could be and got locked out attempting what she told me. I’m looking for someone who knows step by step how to get into the phone. Should I use unlock tools like magfone? If i use the recovery mode and itunes on my pc and click restore will it still ask me for the icloud password? would it be a waste?

This forum is for programming, not for iPhone assistance. I wish you good luck