Canon 754 in the current 1983 code of canon law runs as follows. “All the Christian Faithful are obliged to observe the constitutions and decrees which the legitimate authority of the Church issues in order to propose doctrine and to proscribe erroneous opinions, particularly those which the Roman Pontiff or the college of bishops puts forth.“
This canon was not made up by Vatican II, it is a simply rephrasing of the already existing canon 1324 in the 1917 code. This canon covers texts like the 1907 Lamentabili – on the errors of the modernists because it was a decree from the Congregation of the Holy Office. It also covers texts from Vatican I such as the dogmatic constitutions Dei Filius on the Catholic faith and Pastor Aeternus on the Church of Christ. More recently, it covers the dogmatic constitutions of Vatican II – Sacrosanctum Concilium on the sacred liturgy, Lumen Gentium on the Church, Dei Verbum on divine revelation and Gaudium et Spes on the Church in the modern world. It also covers the list of Vatican II’s decrees like on ecumenism, on the pastoral office of the bishop, on the apostolate of the laity ….
What other insights does this offer? We may note that if we were to take the 1907 text on the errors of modernists seriously and it was from the Congregation of the Holy Office, we should take texts from Vatican II directly promulgated by the Popes in a sacred ecumenical council. This is suggested by the last part of the canon – particularly those which the Roman Pontiff .. puts forth.
One may object that Vatican II did not teach anything. I refer that objection to my list of placed were Vatican II uses teaching language https://defendingvatican2.ca/2021/02/20/locations-list-where-vatican-ii-says-it-is-teaching-the-faithful-not-just-pastoral/
We should keep in mind that not all teaching has to be made ex-cathedra and in solemn language. Vatican II does show several instances of serious teaching language moments even if they are not using the same formulas as was custom in times past. The names of the texts themselves – dogmatic constitution seem to lend themselves to the idea that something is being taught or laid out.