From God. That whole ‘bind and loose’ idea with the authority He gave the apostles and their successors, along with the authority given the Church He established and notes as the ‘pillar and bulwark of truth’ from Scripture.
And here is a good point to remember as well. The Church is not out there in the business of making up rules out of nowhere or starting up new ideas on its own.
The Church’s business is to spread the Good News that Jesus gave us. To ‘hold fast’ to the Truth as it was spoken and written by God.
Where the Church appears to do ‘new things’ is only with regard to disciplines which can change but are rooted in Truth, or with something which the Holy Spirit (noted in Scripture by Christ as the Paraclete sent to bring His followers to all truth) has directed. That’s why although the Trinity is implicit in Scripture with mention of the Father, Son, and Spirit they are never EXPLICITLY referred to in Scripture as being a Trinity, THREE divine persons in ONE God. The Holy Spirit brought the early Christians to that truth and so that teaching is now EXPLICITLY taught as truth.
Or regard to ‘celibacy’ in the priesthood. In the early years, in a time where the culture was more traditional and communal and rural, a married man with a small flock could be both priest and husband/father. As the centuries brought forth larger communities and more responsibilities rather than simple subsistence and survival, for much of the Latin world where the priests were involved with war, famine, disease, urbanisation, etc. It became clear that having an unmarried priest was necessary to give the people an ‘undivided heart and attention.’ It is a discipline and it can change.