Can you get pneumonia soon after recovering from the first bout?

Sure, if unlucky. There is no law saying one cannot get pneumonia after recovering from pneumonia. Actually, a unlucky, sickly person can get a second case of pneumonia even before recovering from the first case. So, the best things to do are to stay healthy and strong, eat healthy foods, exercise, get vaccinated, avoid sick people; and if quite vulnerable, wear a face mask and wash hands after touching things.