Pope is not infallible on any matter.
Exactly.
Popes can mistakes on religious matters as well.
The doctrine of papal infallibility was introduced rather late in Church history. In the mid to late 1800s by Pope Pius IX, a rather authoritarian pope who didn’t like anyone questioning his policies.
I’m not well versed on Catholicism. Do Catholics really believe that the Pope is infallible?
The Pope is guaranteed by the Holy Spirit to be infallible only in matters of faith and morals. Else, the words of Our Lord would be open to any and every diabolical (mis)interpretation. For those who reject Jesus appointment of Peter as the head of His (Jesus’) Church, well, there is no infallible teaching. And nothing is certain. Which is why there are so many evangelical and protestant branches of Christianity.
The Pope is not infallible. Only the Sacraments are.