Mark Ronson co-produced the song. Cyrus and the Anglo-American producer first got together after her appearance on the November 4, 2017 episode of Saturday Night Live
. Her performance attracted Ronson's attention, and they recorded some tunes for his Late Night Feelings
album, including the hit single "Nothing Breaks Like A Heart
." He later collaborated with Cyrus on three Plastic Heart
"When I called Mark that day to get in the studio, I had said to him 'I was gonna call you, or someone that I shouldn't,'" Cyrus explained to New Zealand's The Edge radio about this song's background. "This was also at the time when I was working on getting sober and kind of figuring out sobriety and was like, if I can't get high, I'm just going to write about it."