What do i do if i dropped my iPhone in water and in under 24 hrs it still works?

I dropped it in a bath for like almost 2 seconds and I turned it off, I put it in rice and waited like 10 hrs or so… It turned back on and works just fine.except my ear kind of hurts when I turn my phone on( which never happens when I turn my phone on) what does this mean

It means nothing; water won't immediately destroy an electronic; two seconds won't hurt it. It's totally fine and there's nothing to worry about. I've dropped electronics in water for longer and they work fine; just don't keep any submerged too long. Enough water will wreck them.

If it's working, you got lucky. Water doesn't always mean the phone is ruined. It does, sadly, mean you can't get warranty service (as they will see the moister indicator and refuse it). But otherwise you're fine.

Your ear hurting might be due to a chip near the earpiece or a piece of rice stuck in it. Check and see if you notice anything. If you don't I don't know what else it could be.