In Sherlock S04E03, when Sherlock meets Eurus in her cell, Eurus asks Sherlock to play the violin and professes that she taught Sherlock how to play the violin.
EURUS: You play, don’t you?
SHERLOCK: How did you know?
EURUS: How did I know? I taught you, don’t you remember? How can you not remember that?
SHERLOCK: Eurus, I don’t remember you at all.
EURUS: Interesting. Mycroft told me you’d rewritten your memories; he didn’t tell me you’d written me out completely.
Sherlock had completely rewritten any memories associated with Eurus, made his best friend into a dog (somehow reminds me of the S02E02, Hounds of Baskerville episode).
Returning back to the question, if Sherlock had blocked every bond with Eurus, how come he still remembers how to play the violin; despite the fact that it was Eurus who taught him to play the violin, in the first place.