Average German Shepherds have cognitive abilities similar to a human child around the age of 3. Exceptional German Shepherd intelligence definitely exceeds that imo.
I grew up in a large family with many children and my educational background is in psychology, and I am convinced that some of my dogs have been as smart as the average 4 or 5 year old, at least…
Part of that, just like in raising children, is about imprinting and instilling inquisitiveness. Creating complicated play activities like hide and seek, hiding toys/wrapping them in a blanket, scent training, etc. I train my GSDs to observe animals rather than go after them, and they will sit on the porch outside and just watch animals like I would.
You can shape dogs to be smarter and incredibly affectionate/empathetic; it’s not entirely genetics in my opinion. For the greatest impact it’s best to start young, but I’ve been able to facilitate more inquisitiveness in rescues/fosters before too.