Riots didn't "just happen". They happened because Trump held a rally telling his followers the lie that what was going on in the Capitol was stealing the election from him, and to march on the Capitol. His tweets were part of that message. The fact that those two particular tweets were not the most egregious ones he's ever made is pretty irrelevant.