He's a man of big ego so he's seeking to be relevant wanting to remain important in hopes they'll put his image on Mount Rushmore.
Hopefully he doesn't go completely off the rails and forgets about the US.
Regardless of who is POTUS, when China moves against Taiwan it will be all out war with China if the US comes to their aid.
One of the smart things Trump has done was to work to get semiconductor production up to scale on the US mainland in order to decrease dependency on semiconductor production out of Taiwan.
The US no longer has the power it once did militarily so the US will likely not survive a war against China when Russia, North Korea, and most moslem nations all join in to fight along side China.
In this scenario it would be suicide for the US to stand with Taiwan. Sometimes self preservation comes before preserving allies.
That's the reality the US now faces in today's world.
Now what Trump could have done is simply "let it slip out" that the US provided Taiwan with nukes long before he became POTUS which would most likely be a bluff (not sure if we ever gave them nukes or not). A bluff like this would make China scared to invade because they would have to believe if Taiwan has nukes then they would use them against major Chinese cities if China invaded Taiwan.
In other words, we could have done like we used to do in the cold war - bluff convincingly which is a part of warfare!
The US government could play like a military contractor got hacked and hackers found evidence that the US military gave Taiwan nukes back when Obama was POTUS and throw him under the bus. That'd be a two fer!