The track originated with Grande performing Imogen Heap's "Goodnight And Go" on tour. She told Brown she really loved the tune and expressed her desire to flip it on her own song. The producer granted her wish and got together with the Social House production duo of Charles Anderson and Michael Foster to create the instrumentation using the Heap track as its basis, after which Grande and her frequent collaborator Victoria Monét penned the lyrics.
Anderson and Foster worked on their production during a six-hour flight aboard Grande's private jet. "Before we even landed, we played her an idea, and she was like, 'I love this. Let's record it tonight,' " Anderson recalled to Billboard
, which is exactly what happened.