For me an encounter is akin to a scene within an act, with a number of acts per adventure. I usually like my acts to follow an adventure hook, so it’s difficult to have scenes/encounters that’re completely random. I usually run sandbox campaigns with plot point funnels, where the party achieves a plot point/milestone and then transitions to something new – new location, new discovery, new revelation, etc. So, the randomness is more around random adventures the party comes upon as they adventure, explore or investigate prior to a plot point.
I often exploit a PCs fault (Fate trouble aspect, Savage Worlds hindrance, 5e background flaw, etc.) as an adventure hook. Those tend to be more dynamic adventures and seem better suited to have encounters randomly rolled, which I do for some. Another area I will use a random encounter, is during a chase in which some or all of the party have been overtaken by a pursuer. I do that more with Savage World and Call of Cthulhu, as their chase mechanics are quite structured and feature rich. So, using random encounters for the what-if of being caught, frees me up to focus on other details.
I like to homebrew and what I do that’s at times random, are random adventures. When a creative idea just won’t come to me, I have a number of random adventure generators that will let me rollup a skeleton of an adventure. With the whole adventure being random, the encounters are of course too. They still end up being my own thing, as I have to flesh out bullet points, write narrative blurbs and detail NPCs. I have a number of those for different genres, with most coming from the previous EXplorers and Deluxe edition of Savage Worlds, when such tools were a staple for 1st & 3rd party settings.
I’m a big fan of the Journeying play mechanic for Adventures in Middle Earth and use it with a number of Fantasy TTRPGs. That subsystem is contingent upon random encounters when the journeying party encounters some complication. You can create prewritten encounters for those, but I’ve found it to be well suited to random rolling, with results being humorous almost as often as they’re dangerous.