The present invention refers to 4-amino-substituted pyrazolo[3,4-d]pyrimidine and pyrrolo[2,3-d]pyrimidine derivatives of formula I and IV able to target the Src family kinases (SFKs) such as Src, Fyn and Hck tyrosine kinases as well as Abl tyrosine kinase and uses and method of preparation thereof. In particular, the compounds of the invention are for use in the treatment and/or prevention of cancer, such as neuroblastoma (NB) or glioblastoma multiforme (GBM) or for use in the treatment and/or prevention of neurodegenerative diseases such as taupathies.