In the "A Snippet into Billie's Mind" video for xanny, Billie states that the song was written the day after a party where her friends "were Juuling, throwing up, drinking. Kept throwing up, kept drinking more". According to Billie, nobody was fazed by the situation at all and she was watching her friends "become completely not who they were". At this party, a girl was smoking two cigarettes and blew the smoke into Billie's face, which inspired the sound of the chorus, as Billie stated it was meant to "sound like what it feels to be in secondhand smoke".
The production of the song began one night when Billie came into a room in which her brother and his girlfriend were sleeping and began playing the piano, coming up with the song's chord progression and one of its lyrics.
The song discusses the glorification of drug use, drinking, and smoking. It speaks on how more teenagers and young adults are getting into drugs and alcohol over time and how it is becoming normalized in society. Billie stated that the song is not necessarily telling people not to do drugs, but rather to be safe when doing so.
- The title refers to Xanax, a short-acting benzodiazepine that is often used in short term management of anxiety disorders, specifically panic disorder or generalized anxiety disorder (GAD).
- The spoken lines at 1:08 were recorded by Billie on her phone at a party.
- The last vocals of the song were recorded a couple of days after a friend of Billie's had passed away.
- This friend could possibly be XXXTentacion.
- In an Instagram story announcing that Billie would be filming a music video for all the good girls go to hell, it was hinted that this song would also receive a music video that would be filmed on August 8th, 2019. This was further hinted at in another Instagram story that was posted on August 9th, stating "guess what i did yesterday" with a screenshot of the song.
- The music video was later released on December 5th, 2019, and would be Billie's directorial debut.