Nail fold infection (i.e. paronychia) is often caused by a nail that is growing inwards and/or a narrow shoe that presses on the nail. The treatment depends on the severity of the infection.
You can find treatment instructions from Health Village’s Skinhub (in Finnish and Swedish).
Once the infection has gone down, a podiatrist can correct the nail’s growth form using a nail straightener.