Charlie Puth has revealed how a harsh comment from Elton John inspired him to be honest when making music.

"The most important thing you can do, for all the songwriters watching this, when you write a song, it's important to tell the truth. I wasn't really doing that in 2019," the 30-year-old singer-songwriter confessed during his guesting on "The Ellen DeGeneres Show" on Wednesday. "The person who awoken my sense was none other than Elton John."

He then recalled meeting John while he was at Craig's Restaurant in West Hollywood. It was then that John told him, "You know, your music sucked in 2019. It wasn't good."

Though Puth did not disclose when exactly that meeting occurred, he admitted that the 75-year-old music icon's words were like a "gut punch" to him. He said John's comment just confirmed the same thoughts he had about his music at the time.

"I was going through a messy breakup, and I think that was also going alongside it. It was kind of a wake-up call. I was in denial a little bit," he explained. "Then, the whole world shut down and I was able to sit with my new way of making music and just decided I would never put out a song again if it weren't the truth."

Puth went on to tell Ellen DeGeneres that his upcoming album will be called "Charlie" because it is "the most 'me' music ever." He added that the "happiest" song in it has the same title.

According to him, TikTok played a role in the creation of his album, his follow-up to "Voicenotes" that dropped in 2018. Apparently, he wanted to release an upbeat track to cheer up people who have been confined inside their homes for two years due to the pandemic. He then documented his process while working on the track, titled "Light Switch," and uploaded it on the platform last year.

Puth said he has been pleased to see fans coming up with their own versions of the now-viral song.

"Some producers have even taken, run it through Isotope, and taken the a capellas, and made their own versions of 'Light Switch'. I love that. I think music should be twisted and pulled in many different directions. That was just the goal for this album, and I’m really excited for people to hear it," he told New Music Daily's Zane Lowe in January.

charlie puth songland episode
“Songland” featured Charlie Puth in this week’s episode. Trae Patton/NBC