Elections are easier to solve technically. No mail in ballots. Require state ID in person at the voting center. But that's a different topic that can get divisive, long and derailed very quickly.
I don't love disenfranchising voters but I think it's probably better than allowing elections to be vulnerable to foreign tampering, don't you think?
And yes, I think we likely will see social media become segmented so hostile nations will be blocked from posting on local social media. Or at least having them flagged as foreign accounts.