The contents linked to the Sustainable Development Goals (SDGs) should be introduced in studies in the field of education. This research analyzes the knowledge of the Sustainable Development Goals (SDGs) and the 2030 Agenda among 477 participants from the University of Murcia and the University of Valencia in the Degree of Primary Education, Social Education, and the Master of Teacher Training in the Faculty of Education. A descriptive–comparative methodology with a quantitative approach was used based on an ad hoc questionnaire. The educational intervention included theoretical–practical modules on the SDGs and citizenship, with academic readings and case studies on the implementation of the SDGs in various sectors, which positively impacted future education professionals who were to be part of their initial training. The results showed significant differences in the knowledge of the SDGs between the experimental group and the control group at the end of the term, especially among the experimental group, which worked on the SDG concepts in the subjects taken. Greater knowledge was also observed among the students with a Social Education degree who took a subject related to this topic.