Here’s a theory I think is very well supported.
Donald Trump helped the FBI in a sting to nab Russian agents in 2014-15 (same one Carter Page was involved in). Trump pretended to be interested in building a casino in Moscow. He had his agents, Felix Sater (known intel asset) and Michael Cohen do the leg work in terms of communication.
It was these Sater/Cohen communications with the Russians that formed the basis for the Trump/Russia collusion narrative.
The plotters could count on Trump not being able to defend himself, since to do so would reveal confidential info: namely, that he was an FBI asset.
It was pretty low and calculated and Trump has known the score the whole way.