I noticed that the compass app didn't work lately so I called Apple support. Then they said that I should change the battery first within AppleCare+ warranty period because it's degraded.
Your battery’s health is significantly degraded. An Apple Authorized Service Provider can replace the battery to restore full performance and capacity. More about service options…
Actually, I drop my iPhone a lot. That's not so good for the battery. Last time I got the replacement when my iPod touch was swelled.
That's why I went to the Genius Bar again. I have several Apple products, Macbook, iPhone 7, Apple Watch Series 4 and AirPods.
So I did bring everything for restoring from the backup, etc.
Now my iPhone is fine.