Can't get into my new phone
If you can't get into Settings, most phones have a way to factory reset with hardware buttons. You can probably find it with some googling.

If it's a Samsung phone, depending on the model, you can use Smart Switch to do an "Emergency software recovery and initialization", which completely reinstalls the phone's most recent software and firmware. Maybe other brands have something similar.