After shoulder surgery, you may well be prescribed a sling to support the shoulder, and also to warn other people that you have an injured shoulder. The latter is particularly important when being in crowded areas where its likely people will bump into you.
A sling can also have a negative effect however, so should not be worn all the time unless specifically advised by your doctor or physical therapist.
The shoulder is designed to move, so immobilizing it with a sling can cause secondary stiffness or frozen shoulder. This is not great news for anyone recovering from shoulder surgery.
My advice is to follow the instructions of your consultant surgeon. If he or she hasn’t given you advice about how to use your shoulder sling, then ask them.