Q: i opened the rear light compartment and there is a loose wire but it doesn't seem to obviously go anywhere

A: Most likely the audiable alert speaker failed. There are trouble codes if your mechanic and push on and off switch 6 times in 5 seconds and the system does it's diagnostic. I replace far more speakers than sonar sensors. Those sensors have to be clean not damaged and no bumperstickers covering them.