Take medical help, if the pain persists for a longer duration. Do not wait for it to go away on its own.
If you already have this issue, make sure to keep your body mobile during the course of infection. Engage yourself in some sort of physical exercise.
Do not stop doing exercises, just because you are unwell. Physical inactivity has been tracked as one of the major adverse effects of COVID lockdown which was imposed by governments worldwide to stop the spread of the infection.
Lack of physical activity makes the body a breeding ground for several life threatening diseases.