A year ago, Pinar Toprak made history by becoming the first female composer to score a movie that made better than $150 million at the box office. “Captain Marvel” ultimately took in more than $425 million domestically.

This week, Toprak returns with music for another female superhero: “Stargirl,” toplining Brec Bassinger as Courtney Whitmore, a Middle America high school student determined to follow in the footsteps of her late father, Starman (originally a 1940s comic book hero). It debuts May 18 on DC Universe and migrates to The CW broadcast network the next day.

“From ‘Captain Marvel’ to ‘Krypton’ [another comic book series Toprak scored], I knew Pinar’s work very well,” co-creator and producer Geoff Johns tells Variety. “The creative connection was instant. Pinar is as passionate about superheroes as she is about music. She not only understood the tonal intention of ‘Stargirl’; she added an entirely new layer to the character and series.”

Johns told Toprak he wanted “something classical, iconic and soaring and real. Something that reflected the bright enthusiasm that powered Courtney and the staff,” referring to the source of Stargirl’s cosmic powers.

He cited such ’80s movies as “Back to the Future” and “E.T. the Extra-Terrestrial,” both of which featured large orchestras. He and Toprak decided to score every episode using an ensemble of Los Angeles musicians instead of the usual sampled, electronically manufactured “pretend orchestras” so often heard on network TV shows.

“I felt it was important for the integrity of the score and what we were trying to do,” says Toprak. “It’s a very cinematic show.” They recorded the first 12 episodes with 34 musicians and the finale with nearly 60. (They finished scoring in December, long before the COVID-19 crisis.)

As she did with “Captain Marvel,” Toprak composed a heroic theme for “Stargirl,” very much in the comic book tradition launched in 1978 by John Williams in “Superman.” She then added an entire library of themes and sounds for the various characters in the series: a “very heartfelt and intimate” piece for Courtney and her stepfather, Pat Dugan (Luke Wilson); a driving action theme for the Justice League of America; a “suburban, American vibe” for small-town Blue Valley; and colorful motifs for such supervillains as Brainwave and Icicle.

Toprak and Johns met, surprisingly, on Instagram. They immediately connected over personal losses: Johns’ sister Courtney died in a plane crash in 1996 and became the inspiration for the character; Toprak’s close friend, also named Courtney, died of cancer just a few years ago. “Just the name Courtney has a very special meaning for me,” she adds quietly.

“At the outset, we discussed tone and intention,” Johns says, “who Courtney Whitmore/Stargirl were, the feel of the show, the nostalgic and forward-looking qualities. Pinar began working with themes and music, which out of the gate were amazing. From there, we’d talk and she’d create.”

Johns also chose many of the songs peppered throughout the series. “It does take place in a high school, and there are certain things that well-chosen songs can convey more effectively sometimes than score can,” Toprak says. But, adds Johns, “Pinar put the heart on full display for me.”