Camila Cabello's new single was inspired by her mom's advice.

The 25-year-old singer joined forces with Ed Sheeran to make 'Bam Bam', and Camila has revealed her mom's influence over the new tune.

She shared: "I started writing this song with my collaborators a few months back and we had this chorus idea about what it's been like in my late teens and early 20s falling in and out of love and ups and downs of that.

"Also reminding myself, as my mom has told me many times, 'That's life.’ You're on the ground crying on the bathroom floor and then you'll have feelings for another person again, and you'll be crying on the bathroom floor again. And that is the cycle of change. Things just change, you never know what's around the corner."

Camila loved working with Ed, 31. But, at one point in time, she feared he might walk away from the project.

She told 'Entertainment Tonight': "When I sent the song and he said, ‘I love, let’s definitely do this,’ I just felt like, 'This is too good to be true, he’s going to change his mind.' He didn’t and he has been so exciting about it throughout."

Camila split from Shawn Mendes in 2021, but the duo have subsequently remained firm friends.

The 23-year-old singer also recently acknowledged that heartbreak is a big inspiration for them both.

He said: "She knows me and I know her, and ultimately, we both are writers and we both know what it is to make music and what the bigger picture of making art is. We're supportive of that, always."

Shawn has also been forced to learn "how to cope" without the brunette beauty by his side.

He shared: "You've got to give yourself a lot of grace to kind of be a little bit of a mess, and that's okay. And then, you have to look around at the people who are there and not the people who aren't."