Understanding Phase Transitions, Symmetry Breaking, And Interaction-Enhanced Sensing In Optomechanical And Cold Atomic Systems