Well, there might be no difference at all. It depends on what you are looking at. Both of them could refer to a trademark, for instance. However, the lowercase letters could be superscript beside the caps, which would mean that someone has trademarked the capital letters TM as specific to their company.
Here are some of the things that TM can mean as an acronym:
Chat with our AI personalities
Trademark Slogan mark registered trademark
Difference between paging and what?
just difference
what is the difference between mg and mgl
the difference between webcontrol and literal?