E.l.f. Beauty released an original album late last month, joining Gap and Wendy’s in a growing push by retailers to make their own music and catch the attention of younger shoppers.

The album, Mirror Mix, collects songs from seven rising artists, among them a WNBA player and a Grammy-winning singer-songwriter, and streams on Spotify, Apple Music, Amazon and Roblox, the company said in a press release.

Patrick O’Keefe, the company’s chief integrated marketing officer, said the point is to lift independent artists and stay close to customers. “When you put community at the center of everything ... programs and campaigns and building music, which evokes emotion ... it changes the conversation. And we want to be top of mind with our community,” he said in an interview with CNBC.

It is E.l.f.’s second album, after Get Ready With Music, The Album in 2024, and the brand’s history with music goes back further. In 2019 it wrote an original song around its name, eyes.lips.face, that went viral on TikTok. “It propelled the brand into new dimensions,” Mr. O’Keefe said. “People didn’t know what eyes, lips, face — what E.l.f. — stood for, and we created the song to embrace what it stands for.”

The company calls the approach disruptive marketing: make moments people notice. It has started a TikTok reality show and was among the first brands with a Twitch channel and live shopping on that platform. “We’re an entertainment company that happens to sell beauty products,” Tarang Amin, the chief executive, joked at a Deutsche Bank investor conference in June.

Gap got there days earlier. The clothing chain announced a multiyear partnership with Just Your Type, an up-and-coming boy band, that includes a multi-episode docuseries, a national mall tour and a clothing collection. It is the first project under Gap’s new “fashiontainment” platform, and Pam Kaufman, the chief entertainment officer, said it would “create something much bigger than a campaign.”

The platform is part of a long revival at Gap, which closed about 2,000 stores and lost $3.5 billion in annual sales between 2001 and 2021. “Fashion is entertainment,” Richard Dickson, the chief executive, said in January, when the entertainment job was created. Today’s customers, he said, “aren’t just buying apparel, they’re buying into brands that tell compelling stories and drive cultural conversations.”

Wendy’s took a different route. Its emo album, Songs to Listen to in a Wendy’s Parking Lot, trades earnestness for jokes, with songs like “She Said She Didn’t Want Fries” and “The Best Combo Meal on the Worst Night of My Life.” The lead song has passed 450,000 streams on Spotify, and the announcement drew hundreds of thousands of likes on Instagram.

Bob Wright, Wendy’s chief executive, named marketing as a focus on the chain’s most recent earnings call. “We have one of the most recognizable brands in the industry, and we need to make our messaging, media and creative drive a meaningful connection with our customers and drive traffic to our restaurants,” he said.

All three companies are chasing the same finding. Consumers who see a brand as culturally relevant are more likely to notice it and to buy from it, United Talent Agency wrote in a June report: 90 percent of Gen Z in the first case, 68 percent in the second. “Cultural relevance moves the entire purchase funnel,” the agency wrote, “especially for Gen Z.”

At E.l.f., the spending is real. More than 20 percent of net sales in the fiscal first quarter went back into marketing and digital, the company said, and that share is expected to grow this year. The payoff so far: unaided awareness, the share of shoppers who can name the brand unprompted, has tripled in five years, to 45 percent from 13 percent, Mr. O’Keefe said. Profit doubled in the latest quarter, E.l.f.’s 30th consecutive quarter of growth.

Some of the money is found money. E.l.f. collected $50 million in tariff refunds in the three months that ended June 30, after the Supreme Court struck down President Trump’s “liberation day” tariffs and a federal judge ordered the funds returned. “We feel we never should have had the tariffs to begin with, so let’s invest in our brands to drive the strength that we see,” Mr. Amin told CNBC in an interview in August.