Differential equations satisfied by modular forms and $K3$ surfaces