Let me begin by saying your read of the situation is correct, and there is no plausible way that repealing Section 230 would lead to an increase in free speech on the Internet. Other answers have given good explanations of why that is, but your explanation is basically correct: increasing liability for user content will lead Internet companies to censor more user content. That's basic economics. Indeed, liberals who support Section 230 repeal like Beto O'Rourke and Joe Biden do so because they support an increase in social media censorship of speech they don't like, specifically hate speech and election misinformation respectively.
But why is then Trump against it, if he's for free speech? Am I either not understanding the law or Trump's position on it?
There is a third possible option here, namely that Trump's public position is not built on actual principle at all.
Section 230 has existed for decades, the repeal movement for a few years, but Trump's crusade against it began on a very specific date, May 28, 2020, when he issued an "Executive Order on Preventing Online Censorship." The following day, he sent his first ever anti-Section 230 tweets.
Two days earlier, May 26, marked the first time that Twitter had slapped a disclaimer on a Trump tweet.
The White House executive order was pretty explicit that the order was being issued in response to Twitter's actions:
Twitter now selectively decides to place a warning label on certain
tweets in a manner that clearly reflects political bias. As has been
reported, Twitter seems never to have placed such a label on another
politician’s tweet. As recently as last week, Representative Adam
Schiff was continuing to mislead his followers by peddling the
long-disproved Russian Collusion Hoax, and Twitter did not flag those
tweets. Unsurprisingly, its officer in charge of so-called ‘Site
Integrity’ has flaunted his political bias in his own tweets.
So if it seems to you through a plain reading of Section 230 that the actual effect of its repeal would be to stifle speech at great cost to Twitter, or to force Twitter to shutter completely... consider that might be the point?