Pedagogy is a knowledge system or educational law (such as psychology, sociology, etc. It is a discipline that studies some phenomena or problems in educational activities and summarizes their laws.
When the definitions of these two words are mastered, the relationship will naturally be understood.