Contact the physician or physical therapist before you begin to exercise. Usually, the advice is to wait at least 24 hours before beginning any exercise after a cortisone injection. The injection itself may cause pain. If there is pain beyond the 24 hour period, wait until the pain from the injection has completely subsided before beginning exercise.
Start with gentle exercise and gradually increase in intensity based on your tolerance. Gentle range of movements and stretching exercise followed by light resistance activities for the first one or two sessions after the injection is usually recommended then you can gradually progress back to the levels you were able to tolerate before the injection.
Remember, the cortisone is used to break the pain cycle to allow strength and stability training. https://www.nhs.uk/conditions/steroid-injections/