When Navied Mahdavian, a cartoonist, and his wife, Emelie, a filmmaker, moved from San Francisco to Mackay, Idaho (population 473), they fixated on their new hometown’s theater. Or, rather, the ghost of a theater.A red and white marquee for the Mackay Main Theater dominated part of Main Street, and Mr. and Ms. Mahdavian, who had moved in pursuit of a cheaper and less frantic way of life, resolved with other community members to reopen the cinema, which had been defunct for years.Before the big reopening, one longtime town resident seemed less than enthusiastic about the plan, Mr. Mahdavian recalled, accusing the theater boosters of trying to import an “artsy-fartsy, social-justice-warrior” sensibility to the Idaho mountains.“We’re actually showing a western,” Mr. Mahdavian said.To which the resident replied: “John Wayne?”Instead, the Mahdavians chose “Damsel,” a new-age western from 2018 featuring a heroine played by Mia Wasikowska, a wimpy male character and a masturbation scene. It didn’t go over all that well.“We probably should’ve anticipated that the reaction in town would be mixed,” said Mr. Mahdavian, 38, who has chronicled his move to a rural area in the forthcoming book “This Country.”By taking an active interest in the West of the American imagination — and the ever-evolving notions about what a western story can, or should, be — the Mahdavians are part of a larger movement.“Every generation is going to interpret differently what it sees in the West,” said Richard Aquila, a historian and author of “The Sagebrush Trail.”Photo Illustration by Kim Hoeckele for The New York TimesCowboys ride in and out of popular culture every few years, propelled by a hunger for stories that are wild, tumultuous and unvarnished. Now, as western style spreads across fashion and entertainment once more, that spirit of reinvention is being applied to reinvent the western itself, inflecting an old genre with new viewpoints.Two cultural stars of the summer, Beyoncé and Barbie, have invoked western tropes. Beyoncé wore a disco cowboy hat tilted over her face and sat atop a silver horse in portraits promoting her Renaissance World Tour, the imagery reminiscent of an extraterrestrial cowgirl. Re-creations of the hat, for fans trying to mimic the look, have sold for over $100 on Etsy. “Barbie,” which has climbed to more than $1 billion at the box office, included a lengthy sequence of Margot Robbie venturing deep into the Wild West of Los Angeles while wearing a white cowboy hat, a pink bandanna and a western-cut pink ensemble. And Taylor Swift may no longer wear western gear in public, as she did early in her career, but there were plenty of cowboy boots and cowboy hats to be seen among her fans headed to the Eras Tour shows this summer.History rhymes, fusty fashions turn trendy and cult classics become newly beloved — so it’s no surprise that cowboys keep cycling back into the popular imagination.“There’s a longstanding tradition in American history of looking West,” said Andrew Patrick Nelson, a historian of American cinema and culture at University of Utah. “Part of the appeal is the idea you can live a more authentic, exciting and rugged life.”Coming out of a period of pandemic malaise, millions of people have gone that-a-way — in their clothing choices, social media posts, and selections of TV shows and movies. In fashion, high-end brands, including Prada, unveiled spring collections comprising get-ups that smacked of the Old West. On TikTok, thousands of women have posted videos of themselves modeling outfits billed as “coastal cowgirl” — linen shirts, boots, hats and well-worn denim shorts. The #CoastalCowgirl hashtag has racked up tens of thousands of views.“Glam western is probably the No. 1 trending thing in fashion right now,” said Taylor Johnson, 36, who owns the concert wear boutique Hazel & Olive.The silver cowboy hat worn by Beyoncé in promotional images for her Renaissance tour was a fashion inspiration for fans on their way to one of the singer’s concerts in New Jersey this summer.Amir Hamja/The New York TimesTaylor Swift fans, outside the MetLife Stadium in New Jersey in May.Jutharat Pinyodoonyachet for The New York TimesBarbie, played by Margot Robbie, went full cowgirl as she explored the world beyond Barbie Land in “Barbie.”Warner Bros. PicturesBrunello Cucinelli, the fashion designer, said the “ease and sportiness” of western style lent itself to perennial cycles of popularity. “As a younger man, I watched many Sergio Leone movies and listened to Johnny Cash,” Mr. Cucinelli said in an email interview. “While visiting America for the first time, I remember vividly my trips to Texas and how men dressed with their tapered jackets and those great belts with large buckles.”“Yellowstone,” the soapy “red state” rancher television series, was ranked by Nielsen as the top scripted program last year. In interviews, several TikTok users said their #CoastalCowgirl posts represented their efforts to mimic Beth Dutton, the ruthless main daughter of the show played by Kelly Reilly.Kimberly Johnson, 39, a stay-at-home mother in Delaware, said the series offered a reprieve from the Covid-era divorce drama of her own life. When she saw the #CoastalCowgirl trend, she said the thought that crossed her mind was: “Now I have an excuse to dress like I’m from ‘Yellowstone’!”“Yellowstone,” which is filmed and based in Montana, pumped some $700 million in tourism spending into the state’s economy, on top of $72 million in production spending from Paramount, according to a study from the University of Montana (which was sponsored by the Media Coalition of Montana and Paramount). Nearly 20 percent of visitors to the state in 2021 attributed their travel in part to watching the series, in what economists called “‘Yellowstone’-induced” tourism.Jordan Calhoun, a writer in New York who edits the how-to site Lifehacker, was one of the fans who went West because of the show. He said his affection for the series came about in the early weeks of the coronavirus pandemic, when he was locked down in his Harlem apartment and felt the need for a landscape that looked different from what he was seeing out his window. He longed for rows of pines, big stretches of sky. And he wanted to experience the Dutton family’s way of life.“I don’t know how to fix a fence or ride a horse or grow crops,” Mr. Calhoun, 38, said. “Self-reliance, or country living, is something that got really appealing during the pandemic.”Jordan Calhoun, a writer and editor who lives in New York, went West because of his love for “Yellowstone.”Jordan CalhounHe spent five days on a Colorado ranch in 2022. Although the trip confirmed for him that it wasn’t what he wanted full time, it taught Mr. Calhoun, who is Black, that the western landscapes he loved on TV were something he could go and enjoy. That was a realization far afield from what he had felt watching westerns when he was growing up.“I watched ‘Young Guns’ a thousand times,” he said. “There wasn’t much of me in it.”But as much as it is a place on the map, the West is also an idea, one that changes over time. And amid the latest round of fascination with cowboy culture, the western, a staple film genre since the early days of cinema, is being reimagined for a growing audience.From 2000 to 2009, Hollywood made 23 movies categorized as westerns, according to Comscore, which compiles box office data. That number shot up to 42 from 2010 to 2019. Some of these new films feature Black cowboys, Native American protagonists, queer heroes and damsels far from distress. Some are directed by female filmmakers, like Jane Campion, whose 2021 movie “The Power of the Dog,” which features a most likely closeted rancher, received more Academy Award nominations than any other film last year.Alaina Roberts, an American historian who wrote “I’ve Been Here All the While: Black Freedom on Native Land,” was raised with all the classic images of what a western film looked like: Davy Crockett wrestling a bear, John Wayne squinting through the Texas dust. Her mother loved those films.But when Dr. Roberts started her own career as a scholar, those weren’t the visions of the West that captured her imagination. Instead, she wanted to research stories of her own Black family members, who were enslaved by the Chickasaw and Choctaw tribes in what is now Ardmore, Okla. She also grew fascinated by the Buffalo Soldiers, all-Black regiments who policed the plains.“We shouldn’t be afraid of complexity,” said Ms. Roberts, 32, who consulted on the recent documentary series “The Real Wild West,” which focuses on Black and Hispanic cowboys, Buffalo Soldiers, Native leaders and women on the plains. “It doesn’t mean we’re trying to rewrite history.”TV shows and movies including “Yellowstone,” “The Harder They Fall,” “Bitterbrush,” and “The Power of the Dog” are reshaping the cowboy image.Top: Paramount Network, Netflix; Bottom: Magnolia Pictures, NetflixThe list of movies, TV shows and documentaries taking on these more tangled western tales keeps growing. There’s “The Harder They Fall,” a 2021 film from the director Jeymes Samuel about Black outlaws, sharpshooters, horse riders and frontier townspeople. The director Kelly Reichardt has put her stamp on the genre in two films: “Meek’s Cutoff,” which is centered on pioneer women played by Michelle Williams, Shirley Henderson and Zoe Kazan, who realize that a Native American man they meet on the Oregon Trail is more trustworthy than their white guide; and “First Cow,” about a pair of misfits, played by Orion Lee and John Magaro, trying to make a go of it in mid-19th-century Oregon. There’s also Chloé Zhao’s “The Rider,” a rodeo story about the Lakota Sioux tribe.Ms. Mahdavian, 41, who moved with her husband from San Francisco to rural Idaho, is another filmmaker who has trained her camera on the West. Her 2022 documentary, “Bitterbrush,” follows female cattle ranchers near her new home. “I don’t have an agenda to kill the western,” she said. “I find myself drawn to telling stories that feel true to a certain type of lived experience.”Western films have tended to reflect the experience of the people who produced them and the ideas in the air at the time of their production, film historians say. The westerns of the World War II era, for example, fulfilled a hunger for clear-cut messages. Some see “Stagecoach,” the 1939 John Wayne classic, as a parable for the New Deal: A group of Americans (a whiskey salesman, a drunken doctor) have to work together to prevail over what’s lurking around them.Then came the 1960s, when social changes raised questions about the old order, driving a desire for new types of anti-establishment western heroes, like Clint Eastwood’s antihero “Man With No Name” character, or the jovial outlaws played by Paul Newman and Robert Redford in “Butch Cassidy and the Sundance Kid.”“It’s almost like a Rorschach inkblot test,” Richard Aquila, 76, a historian and author of “The Sagebrush Trail” said. “Every generation is going to interpret differently what it sees in the West.”John Wayne, the quintessential western actor, in the 1939 film “Stagecoach.”Michael Ochs Archives/Getty ImagesFor die-hard lovers of western films and novels, the periodic resurgence of the genre is invigorating because it sends new fans toward old classics. W.F. Strong, a professor of communications and culture at the University of Texas Rio Grande Valley, delights in hearing from young readers who have recently discovered Larry McMurtry’s 1985 novel “Lonesome Dove,” which follows a group of lovably bone-headed cowpokes from their tiny hometown, Lonesome Dove, to the plains of Montana.Mr. Strong, 68, said he particularly loved how Mr. McMurtry, who died in 2021, was able to capture the lives of ordinary Americans in the novel. “He was writing about my people — and I didn’t realize you could do that as an author,” he recalled. “When I was young, I thought you had to be writing about glamorous things far away, like England.”For many people, including those taking part in the #cowgirl memes on social media, that’s part of the appeal — the idea that the western experience seems within reach, that wide-open plains are closer than they appear. Kyra Smolkin, a content creator in Los Angeles who has been posting her cowgirl-themed fashions on TikTok, said she grew up in Toronto “romanticizing small towns and ranches.”“What’s cool about cowgirl style is it’s attainable — there’s no barrier to entry,” Ms. Smolkin, 30, said. “I love that there’s an ease to it. It’s easy to make your own.”And for the Mahdavians, the couple who moved from San Francisco to Idaho, there was a thrill to making the western story their own, by setting up a home in the kind of landscape that they had long associated with the movies. They built a house on a small plot of land about a 20-minute drive from Mackay. It is surrounded by snow-capped mountains, and there are no people in sight.They have also gotten past the mixed reception they received for their opening night at the renovated theater on Main Street. They pulled it off by showing “The Quiet Man,” a 1952 western romance starring John Wayne.“We had, like, 70 people come, which for a population of 500 is a lot,” Mr. Mahdavian recalled. “People definitely responded to John Wayne.”First collage: Bettmann/Getty Images (background); Amir Hamja/ The New York Times, Maggie Shannon for The New York Times, Paramount Network, Matt Winkelmeyer/Getty Images (hats); Paramount Network, Jason Kempin/Getty Images (shirts); Gabriela Campos/Santa Fe New Mexican, via Associated Press, Jutharat Pinyodoonyachet for The New York Times, George Frey/EPA, via Shutterstock, Roy Rochlin/Getty Images (boots)Second collage: George Rinhart/Corbis, via Getty Images (background); Amy Sussman/Getty Images (body) More