Can you change the memory of an iphone and put it in another iPhone?

I wanna know cause my iphone got wet and i doesn't wanna turn on so i was hoping that this was my last choice

When you get your new phone, just sync it with iTunes. It will recognize that it's a new phone and transfer everything from the old phone to the new one