If i take off the battery of an iphone 5s will it erase everything?

If i take off the battery of an iphone 5s will it erase everything? - 1

No, of course not. Batteries do fail
sometimes and it would be a major design fault if they used volatile memory which must always be powered to work. The memory and storage also have to cope with the phone being fully powered down when it's completely turned off and when it occasionally needs a hard reset.

If you want to erase everything then go to Settings>General>Reset>Erase all content and settings.