Hi, welcome to justanswer , being hospitalized when you have a surgical procedure like an oophorectomy ( ovaries removal ) exposes the patient to certain microorganisms , including the Staphylococcus Aureus bacteria.
So yes, in certain way , being in the hospital could have exposed you , at the beginning to the staphylococcus bacteria . However , after that initial infection episode , if you continue getting Staphylococcus infections, other factors are probably involved .
So my best advice for you will be to consult a doctor to determine if you have a nutritional deficiency , a weakened immune system , chronic diseases ( like kidney failure , liver inflammation , bronchitis or heart disease) or diabetes which are conditions that make you prone to getting recurrent infections. In that case , treating the underlying disorder will be a vital part of your treatment.
There are things you could do to reduce the risk of reinfection including washing your hands frequently with soap and water , if you have any wounds cover them with sterile bandaids or bandages and do not share your personal items including towel ,razors , bed covers or other personal things including your clothes . It is really important that you take the antibiotics exactly as your doctor recommends it , do not stop taking your antibiotics only because you begin to feel better . When you do not follow your doctor's instructions , bacteria could become resistant to the antibiotics increasing the risk of developing a serious infectious process.
Please click accept if you like the answer, so I can get credit for my work. A bonus will always be sincerely appreciated. I do not get credit for my work until you click the green accept button.
If you have any additional questions or doubts, just ask me so I can help you.