Look at Screeps: World [0] for depth in a programming base-builder RTS.
You write the code for each of your units, either natively in Javascript or Typescript, or via WASM you can run Rust, Python, etc. You use a private server or join a shared MMO world. There's a free sim [1] to try out the basics, though the actual game has much more depth. And an active Discord for help [2].
There's also a variant Screeps: Arena [3] that focuses on 1:1 PVP battles with ranked ladders if you prefer short-lived matches to a long-running world.