[clause] + ,于是 + [clause]
于是 starts the second of two events and says the first one prompted it. Both have already happened, and someone usually decided to do the second.
于是 goes at the start of its clause, and a subject can follow it.
所以 states a result of a reason, at any time: past, present, future or always true. 于是 is narrower. It moves a story on to the next thing that happened, so it never introduces a plan, a command or a general fact.
于是 is at home in written narration and storytelling, linking a chain of events. In a story it often starts a new sentence.