To erase your iPhone and remove the password without using a computer, follow these steps:
Turn off your iPhone by holding down the Power button until the "slide to power off" slider appears. Slide it to power off your device.
Press and hold the Home button on your iPhone while connecting it to a power source using a USB cable. Keep holding the Home button until you see the "Connect to iTunes" screen.
Once you see the "Connect to iTunes" screen, release the Home button.
Launch iTunes on a computer that you have previously synced your iPhone with.
iTunes should automatically detect your device in recovery mode and prompt you to restore it to its original factory settings.
Follow the on-screen instructions to restore your iPhone. This will erase all data and settings on your device and remove the password.
Note: This method is the last resort, as it will erase all your data and settings on your iPhone. However, it is the only way to regain access to your device without a computer.