So in heaven’s hierarchy, who is higher? God or Mary?
God, of course. Mary, like all created creatures, has absolutely nothing in herself. What measure she shares in God's redemptive plan, as great as a share she is entrusted with--even so much as to be the gate through which of the grace of God (that is, Christ Himself) came to us--she is like the moon, shining only with the light of the sun shed upon it. There is no comparison between the highest created being and the infinite eternal Creator, for finite is finite and dependent is dependent. She has not even existence apart from him, like all else. In regard to the hierarchy and understanding how that works with her being Queen, it is important to look at how a Queen Mother functioned in Israel.
As for the authority of the Church, here is a very brief overview.
Matthew 16:18-19
"And so I say to you, you are Peter, and upon this rock I will build my church, and the gates of the netherworld shall not prevail against it. I will give you the keys to the kingdom of heaven. Whatever you bind on earth shall be bound in heaven; and whatever you loose on earth shall be loosed in heaven.”
John 20:19-23
On the evening of that first day of the week, when the doors were locked, where the disciples were, for fear of the Jews, Jesus came and stood in their midst and said to them, “Peace be with you.” When he had said this, he showed them his hands and his side. The disciples rejoiced when they saw the Lord. [Jesus] said to them again, “Peace be with you. As the Father has sent me, so I send you.” And when he had said this, he breathed on them and said to them, “Receive the holy Spirit. Whose sins you forgive are forgiven them, and whose sins you retain are retained.”
Christ appointed Peter as the first Pope and gave the apostles authority in matters of teaching and priestly service. This second passage is not the basis of the practice of confession, but rather the scriptural confirmation of it, as we received it from tradition that was passed down from the apostles. For the sacraments they act
in persona Christi, not as themselves. This is a grace and an authority transferred by the laying on of hands at ordination, which we see in Acts and mentioned of Timothy (1 Tim 4:12-16) and others.
Paul was miraculously chosen by Christ on the road, and one can infer from Acts 1:21 and Galatians 1:12 that he was being taught by Christ in person. But even then, he went to Peter and some others for approval as we see in Galatians 1:11-2:10. They are the ones who were appointed and specially gifted for leading the Church.
Ephesians 4:11-14
And he gave some apostles, and some prophets, and other some evangelists, and other some pastors and doctors,
For the perfecting of the saints, for the work of the ministry, for the edifying of the body of Christ:
Until we all meet into the unity of faith, and of the knowledge of the Son of God, unto a perfect man, unto the measure of the age of the fullness of Christ; That henceforth we be no more children tossed to and fro, and carried about with every wind of doctrine by the wickedness of men, by cunning craftiness, by which they lie in wait to deceive.
1 Corinthians 12:27-31
"Now you are Christ’s body, and individually parts of it. Some people God has designated in the church to be, first, apostles; second, prophets; third, teachers; then, mighty deeds; then, gifts of healing, assistance, administration, and varieties of tongues. Are all apostles? Are all prophets? Are all teachers? Do all work mighty deeds? Do all have gifts of healing? Do all speak in tongues? Do all interpret? Strive eagerly for the greatest spiritual gifts. But I shall show you a still more excellent way."
This authority was not just in matters of judgement, but a protection upon the interpretation of scriptures, which is how the dogmas of the Church were formed and are protected.
2 Peter 1:16-2:1
"We did not follow cleverly devised myths when we made known to you the power and coming[
i] of our Lord Jesus Christ, but we had been eyewitnesses of his majesty. For he received honor and glory from God the Father when that unique declaration came to him from the majestic glory, “This is my Son, my beloved, with whom I am well pleased.” We ourselves heard this voice come from heaven while we were with him on the holy mountain. Moreover, we possess the prophetic message that is altogether reliable. You will do well to be attentive to it, as to a lamp shining in a dark place, until day dawns and the morning star rises in your hearts. Know this first of all, that there is no prophecy of scripture that is a matter of personal interpretation, for no prophecy ever came through human will; but rather human beings moved by the holy Spirit spoke under the influence of God. There were also false prophets among the people, just as there will be false teachers among you, who will introduce destructive heresies and even deny the Master who ransomed them, bringing swift destruction on themselves."
1 Timothy 3:15
"But if I should be delayed, you should know how to behave in the household of God, which is the church of the living God, the pillar and foundation of truth."
They did not tell believers to simply sort out everything for themselves because believers have the Holy Spirit, but rather to particularly be faithful to the teaching and traditions taught to them by the leaders of the Church, by letter or by oral teaching, and to defer to them, and to not accept alternative teachings, even if from themselves. Even to this day it applies; the Church cannot declare a dogma that is some innovation, but can only affirm what has always been of the Tradition.
Hebrews 13:7-9
"Remember your leaders who spoke the word of God to you. Consider the outcome of their way of life and imitate their faith. Jesus Christ is the same yesterday, today, and forever. Do not be carried away by all kinds of strange teaching."
17 "Obey your leaders and defer to them, for they keep watch over you and will have to give an account, that they may fulfill their task with joy and not with sorrow, for that would be of no advantage to you."
1 Corinthians 11:2
"I praise you because you remember me in everything and hold fast to the traditions, just as I handed them on to you."
2 Thessalonians 2:15
"Therefore, brothers, stand firm and hold fast to the traditions that you were taught, either by an oral statement or by a letter of ours."
Romans 16:17
"I urge you, brothers, to watch out for those who create dissensions and obstacles, in opposition to the teaching that you learned; avoid them."
Galatians 1: 8-9
"But even if we or an angel from heaven should preach [to you] a gospel other than the one that we preached to you, let that one be accursed! As we have said before, and now I say again, if anyone preaches to you a gospel other than the one that you received, let that one be accursed!"
And they said this because there were many false teachers around, spreading many heresies through the sorts of books that you are now receiving as scripture.
2 John 1:9-11
"Anyone who is so “progressive” as not to remain in the teaching of the Christ does not have God; whoever remains in the teaching has the Father and the Son. If anyone comes to you and does not bring this doctrine, do not receive him in your house or even greet him; for whoever greets him shares in his evil works."
2 Corinthians 11:12-15
"And what I do I will continue to do, in order to end this pretext of those who seek a pretext for being regarded as we are in the mission of which they boast. For such people are false apostles, deceitful workers, who masquerade as apostles of Christ. And no wonder, for even Satan masquerades as an angel of light. So it is not strange that his ministers also masquerade as ministers of righteousness. Their end will correspond to their deeds."
Jude 1:17-23
"But you, beloved, remember the words spoken beforehand by the apostles of our Lord Jesus Christ, for they told you, “In [the] last time there will be scoffers who will live according to their own godless desires.” These are the ones who cause divisions; they live on the natural plane, devoid of the Spirit. But you, beloved, build yourselves up in your most holy faith; pray in the holy Spirit. Keep yourselves in the love of God and wait for the mercy of our Lord Jesus Christ that leads to eternal life. On those who waver, have mercy; save others by snatching them out of the fire; on others have mercy with fear, abhorring even the outer garment stained by the flesh.
Scripture is one means by which we know the original teachings and traditions, but there are other means.
The Didache is one of the earliest sources detailing what the early church was like, itself far more trustworthy than books you seem to be receiving as scripture. We also have many letters from
early church fathers, and extensive discussions and debates from the
ecumenical councils and for every major heresy that popped up and was shut down. The Vatican website is a bit tricky to navigate but the best resource of all for proper content of all these things.
The resources are all there, but if you want to know it all, you have to put in the work to study. The veracity of the claims to authority of the Church are not easily refuted. The sources are complete, the apostolic succession is fully accounted for and the teachings and traditions are detailed. All along the way, throughout history, the fruit has come to bear and the work of God validated by the lives of saints, miracles, and transformation of nations.
I tried to point you to some books that explain these things. If you want to know more, you can look into that. For something more advanced than
the catechism on theological questions, the
Summa Theologica of St. Thomas Aquinas is excellent. Some other books that are nice are "By What Authority" by Mark Shea, "Crossing the Tiber" by Steve Ray, "The Protestant's Dilemma" by Devin Rose, "Stunned by Scripture" by John Bergsma, "Jesus and the Last Supper" by Brant Pitre, "The House of the Lord" by Steven C Smith, and "The Case for Catholicism" by Trent Horn.
Again, these are not "non-scripture sources" meant to be received authoritatively as scripture, but they are people within the Church explaining things to people who desire answers, just as I am doing in small part right now. If you would be willing to hear from me, you have no reason to reject hearing from them. They have been Catholic way longer than I have, have studied way more than I have, and in regard to the first things I mentioned they are works by founders and doctors of the Church. You will choose what to believe as truth or not, but if you want to know
what it is that Catholicism teaches and why, that is what these are for.