Josh Kear and Chris Tompkins wrote the country chart-topper, and after its success, she leaned into more songs with attitude.