How can I prevent myself from getting shoulder injuries?

Cann't and be active. The only way to guarantee that you do not get a shoulder injury is not to play sports or fall. Since this is not possible or makes life boring keep your shoulder muscles as strong as possible.