Believe it or not, the acronym "SMH" is actually a lot simpler to decipher than you would think. It stands for "shaking my head," indicating the motion one does when they're disappointed in another's actions or thoughts.
You'll often find people using this term online in a serious way, when they're actually expressing disappointment in another user, or in a facetious or sarcastic way, as they're not actually disappointed or upset with another, but want to make the joke that they are.
SMH has been around as an acronym for some time now, dating back before TikTok was an app, let alone before it was popular. It's a fairly common acronym, becoming as commonly used as ones like "IDK" and "LOL."