Thank you for your question.
The antibiotics and pain killers are eliminated naturally by the body and will not stay back in your system. You need to first of all eat a healthy, and balanced diet since this can help prevent infections. The diet should be high in fruits, vegetables, and whole grains, and low in saturated fat. Eating fish at least twice weekly will be beneficial. Exercise is a must. Therefore please ask your doctor about an exercise regimen that is beneficial for you. Exercise will also decrease stress which will again help in strengthening your immune system. Getting adequate sleep is also beneficial. Stress can also be controlled with mindfulness meditation, yoga, biofeedback or hobbies.
You may ask your your doctor about vaccinations which are recommended for you.
You may also consult your doctor about probiotics since these may be useful in treating diarrhea, especially following treatment with certain antibiotics, and also in treating irritable bowel syndrome.
It is a privilege answering your question.
Please let me know if you have further queries or unanswered questions.
Please rate the answer with a positive rating of 5 stars, because this is the only way we experts are credited and compensated for our time and work.
Wishing you all the very best in life.
May you be happy, successful, and healthy.