Referring to the closing scene of Sherlock S04E02 The Lying Detective:
The final scene reveals that the Big Bad gave his daughter's original note page and various details to another character.
Culverton gave me Faith's original note.
A mutual friend put us in touch.
Did Sherlock ever tell you about the note?
I added some deductions for Sherlock. He was quite good. But... he didn't get the big one.
(Found transcript at this link)
By doing so, he set up the caper in which he was caught himself. Why would he do this? I don’t get it.