They are very different games IMHO, to the point that I find it difficult to name what outside some superficial UI similarity and a vague survival setting (that many factorio players disable entirely) is similar.
I’ve sunk a lot of time into both games. They’re complimentary to each other.
Factorio is fantastic if you love automation and building complex production pipelines. The game gives you incredible control over building and controlling the manufacturing of stuff. The main motivation is to optimize that, and there are many avenues to do so. You care very little about your “person” (the being that you control) except to keep it alive.
Rimworld is much more rich in what you can choose to do, since it’s primarily a story generation game. You have a lot less control over your manufacturing pipeline. You also have to deal with the humanity of your pawns, who need to eat, sleep and enjoy recreation. You have to keep them alive through natural disasters and raids. Your pawns may die but the story doesn’t end there.
They’re really different games. When I get upset with stupidity of pawns and want more precise automation, I switch to factorio. When I get bored with the dreariness of an automated factory churning out trinkets, I switch to rimworld.
Factorio has a veneer of RTS but its challenge and interest comes from factory design and managing queues of supply and demand (if you want to think about it like that). It layers complexity on complexity.
Rimworld is all about character management and anecdote creation in my view. The challenge and interest is about managing randomness and character driven conflict in a game designed to produce conflict.
Factorio is almost exclusively about factory building and automation.
Rimworld is much more of a social/survival game, with hunting, gathering, cooking, diseases, invaders, exploration, character emotions, etc.
Factorio has basically none of that; it's much more about plumbing together inputs and outputs into increasingly complex and useful items. The survival aspect of Factorio is just that you are surrounded by bugs that will attack you if you pollute too much or antagonize them.