SCID is primarily caused by genetic mutations that impact the development and function of T cells and B cells, which are crucial components of the adaptive immune system. These mutations can occur in various genes, such as the IL2RG, ADA, and RAG1/RAG2 genes. These genetic defects interfere with the normal production and functioning of lymphocytes, leading to severely compromised immunity.