There is a long-standing connection between Westerns and science-fiction.
The optimism and adventurousness of much sci-fi has its roots in the romanticised depiction of the American frontier in Buffalo Bill's Wild West show, which toured Europe in the 1880s.^[Higgs, John. Stranger than We Can Imagine: Making Sense of the Twentieth Century, 2015.]
Gene Roddenberry described Star Trek as Wagon Train to the stars, referring to a long-running cowboy show.^[Higgs, Stranger than We Can Imagine.]
Mike Resnick wrote a Western sci-fi called Santiago, which I enjoyed reading as a teenager.
Star Wars is arguably a Western sci-fi.
There was a bad movie called "Cowboys and Aliens".
In the 21st-century, Westworld and the Mandalorian TV series would continue this tradition of marrying the genres of the Western and science-fiction.