To add some to previous advice about overhead shoulder exercises. If the doctor told you not to do overhead presses there are other ways of working the muscles similarly.
First, there's upright rows. As far as the shoulder is concerned it's basically the same exercise. With a history of shoulder problems it is generally advised to avoid lifting the upper arms past parallel
Second, there's incline presses. Again, similar muscular involvement, but less stress on the usual suspect in the shoulder i.e. the acromion.
Third, ask if the prohibition against overhead presses applies to all such exercises or just the barbell and machine versions. Dumbbell overhead presses allow the shoulder joint to move more 'naturally' and so are less likely to aggravate a shoulder problem.
Further, there's some variety in rotator cuff exercises that can be useful supplements to the above.
Lying face down on a bench you can do 3 external rotation exercises. With the elbows tucked at the side; with the upper arms straight out from your shoulders; and in-between, so that your arms look like a 'W' from above.
The other rotator cuff exercise is called an 'empty can'. Do lateral raises except with the hand turned with the palms facing backwards, like you would if you were emptying a can.
Lastly, scapular stability exercises will contribute to shoulder health and function. These are usually called something like 'YTI' because the three positions, viewed from above, look like a Y, T and I. The T is just a standard back fly exercise, they can be done lying on a (incline) bench or similar to make the whole set convenient to do*. The Y is the same exercise but your arms extend forward at an angle instead of straight out to the side. The I is done by extending the arms straight back/down, so that the weight is brought from a hanging position to up by your hips. With these three exercises it is important to make sure that your scapula is moving - the scapular movement is the entire point of these since doing so increases the stability of the shoulder joint. Rotation at the head of your upper arm is not helping the scapular stabilizers.
* Alternately they can be done in the same kind of position used for a bent over row, either one arm at a time with the other on the bench or both arms at the same time.
All the supplemental exercises involve small muscles* and should be done with smaller weights and for more reps, typically 12-15.
*The I exercise uses your rear delt and so can be done with larger weights.