There are several ways of going about this. However, all of these solutions revolve around one central problem to having the bad guys win: audience investment. You are asking your audience to sit through a story, only to punch them in the gut at the end and tell them that none of the character's choices mattered and that the audience shouldn't have even bothered to get invested anyway. That kind of story is only going to appeal to a very narrow subset of sadomasochistic readers.
I've seen a lot of people on the Internet write "I wish for once someone would have the balls to write a story where a non-sympathetic bad guy wins unequivocally with no bittersweet ending or chance for the heroes to come back and win in the sequel or something" (no joke, this is about word for word what I've seen said), but this is a huge case of "you think you want this, but you don't". It sounds interesting to talk about in practice but it's almost impossible to pull off well in reality. Most of the people who express this sentiment fall into three categories:
- Low-empathy edgelords who want to see the bad guy win for shock value, or worse outright see themselves as the dark lord and want to be validated by them winning
- Bored readers who are sick of seeing the heroes win without issue and want to shake things up a bit. Probably the largest contingent
- The "harder, daddy" readers who like to make themselves emotionally suffer. And not in a "this story made me feel emotions" kind of way.
Similar to what I noted above, this only applies to a very small subset of readers, and so your story isn't likely to have a huge number of people who want to read it.
Another big issue to having the bad guys win is that it results in very little re-read value for the audience. Seeing the bad guys win can be a huge, shocking twist, but when someone re-reads the book there is very little emotional investment because the reader knows how it will all turn out and hence there is no reason to care about the protagonist's struggles.
Authors often say their job is to make their audience feel novel emotions, but when that emotion is expressed by your audience burning your books and telling potential readers to never pick up a book in that series again because of the ending you are shooting yourself in the foot as an author. I've seen authors intentionally do that to make their readers angry because they want to make a statement, but that kind of self-martyrdom never works. Case in point The Last of Us Part 2 and Animorphs. Almost no one got the message Neil Druckman wanted to send with The Last of Us Part 2, and while many people got the anti-war message K.A. Applegate was trying to send, few would argue that The Beginning did this better than, say, The Hork-Bajir Chronicles. Upton Sinclair famously remarked that when he tried to do this in The Jungle, the public didn't care about what he had to say about how capitalism dehumanizes people and only cared about the dismal conditions he portrayed in food processing plants.
1984, Animal Farm, The Jungle, and Brave New World are exceptions, but this is because they represent a very specific subgenre of dystopian novels that has a very specific. The purpose of these novels is to show "look how bad things would be if philosophy X became the dominant power", and the characters are mostly cut-outs designed to drive the plot forward and we as readers are not encouraged to empathize with them. We aren't following the character's journey, we're taking a tour of the dystopian world to see how messed up the system is. In your case, it's not possible to do the same because these novels are meant to explore the dystopian implications of real-life philosophies, and saying "look how bad it would be if a dark lord with magic and a horde of orcs took over the world" would come off as disingenuous.
Readers also become more invested in seeing the good guys win the longer a narrative runs, because they've invested increasing amounts of their time and attention to the narrative. This is why works like 1984 or Brave New World are short, and most tragedies broadcast at the beginning that this is all going to end badly so don't get your hopes up.
Just because a character is a protagonist of a story, doesn't make them a good guy. Light from Death Note, Macbeth from Macbeth, Walter White from Breaking Bad, and Joker from Joker are all examples of stories where the protagonist is clearly he bad guy. Having a villain protagonist circumvents the issue of audience investment because you are asking the reader to side with the "bad guy" rather than the heroes. Additionally, because you are providing either a first-person or third-person look into the "bad guy's" mind, the reader will be more sympathetic towards them and more invested in seeing them win.
Joker is a bit of an odd case. Readers are more likely to let you get away with a straight-up downer ending if they know ahead of time it is a prequel and hence later in the timeline the bad guys get their comeuppance. Other examples include The Hork-Bajir Chronicles and Fate/Zero.
Notably, it's possible to write a story where the protagonists are heroes and win, ones where the protagonists are villains and win, or ones where the antagonists are heroes and win, but not one where the antagonists are villains and win. This is because as the author you are asking the reader to pick sides between the protagonists and antagonists, and having the characters you have been rooting against and are less sympathetic win leaves a bad taste in reader's mouths. Imagine if you wrote Harry Potter and it ended with Dolores Umbridge becoming the Minister-for-Life of the magical world and Harry got thrown in Azkaban. Readers would throw a riot.
This ties into another key concept of fiction: catharsis. Catharsis is the emotional release one gets from reading fiction, like letting the tension out of a spring. In some ways it could be described as a "release of narrative tension". The goal of almost all fiction, whether writers know it or not, is catharsis. Potential catharsis is created in a variety of situations, but one of the most common ways is for there to be some kind of moral imbalance in the universe that needs addressing. Macbeth is probably the premier example of this. Macbeth has violated the natural order by murdering his liege lord, and so as audience we know that Macbeth must have his downfall in order for balance to be restored.
More broadly, the job of the writer is not to write a story that is "realistic". Fiction almost never reflects reality, and even well-written fiction often boils down the nuances of analogous real-world issues to act as strawmen. People in real life don't act as noble or evil as fictional heroes and villains, because too much nuance distracts from the story the author is trying to tell. What the job of the writer is, however, is to tell a story that is interesting. So long as you tell a story that is interesting and readers can get invested in, you could make it about bunny rabbits on the moon for all anyone cares.
You say that you don't like stories where the heroes' victory is contrived: that's a perfectly reasonable feeling. The writer's job is not to make it so the protagonists win, the writer's job is to make it so that the readers believe the protagonists can legitimately lose, even if the outcome was never in doubt. Having a heroic victory be contrived is more a symptom of bad writing than anything else. A good example of this is Marvel's Infinity War and Endgame. Thanos losing was unsatisfying, but that's not because it's more "realistic" for Thanos to have won, it's because the writers basically made Thanos too powerful, basically purple God with an "I Win" button (example: him undoing Vision's heroic sacrifice, demonstrating that there is honestly nothing the heroes could have realistically done to thwart him), and the writers had to invent a ham-handed deus ex machina in order to undo the damage he caused.
Tragic stories quite frequently end with the protagonists losing. However, tragedies often end in some kind of bittersweet aspect in order to counterbalance the tragedy and have some form of catharsis. One common example of this are stories where the heroes fail at their initial goal, but achieve some sort of self-realization or romance that makes their lives happier. Or ones where the day is saved at the cost of the hero's life. Or ones where the heroes win a moral victory even if the villains win the physical one (Brave New World and Hero being good examples). Notably, these never happen in stories where there is some kind of dystopian regime (except the "moral victory" one. Having the hero find true love but the world is still ruled by a brutal dictator comes off as still hugely imbalanced morally, because the latter kind of invalidates the former.
The movie Hero received a lot of controversy because it basically had the bad guy win with little comeuppance, even though it was based on a real-life event in the history of the Chinese Emperor Qin Shi Huangdi, who is pretty much the poster child for "megalomaniac dark lord who conquered the world and got away with it", so they couldn't have the dark lord's attempts to conquer the world fail because that would be ahistorical. This shows the kind of reaction you're likely to get if you write this in a fantasy setting where it's not possible to justify the dark lord winning because "that's what really happened".
More notably, you’re proposing a story structure in which there is no change to the status quo between the beginning of Act I and the end of Act III. Beginning of Act I the dark lord is conquering the world, end of Act III the dark lord has conquered the world and the heroes are either subjugated or dead. To sum it up, think of it this way. Where is the narrative conflict in your proposed original story? The dark lord steamrolls his oppression and takes over Middle Earth? Where's the drama in that?
Similar ideas actually have been pulled off in fiction before. Mistborn Era 1 was explicitly conceived as “Frodo gets to Mount Doom, only for Sauron to take the One Ring back and rule over Middle Earth with a thousand years of darkness." Only Brandon Sanderson skipped ahead in the timeline to the end of that thousand years of darkness because he realized that there was no meaningful conflict in his idea as originally planned.
Your "world ruled by orcs" idea sounds interesting and has the potential for drama, but the preceding story just sounds boring. Do what Sanderson did and just set the story in the timeframe where the dark lord has already won.