Not too hard to understand and it is an EXTREMELY restricted dogma......ONLY if the Pope declares so, and ONLY if he speaks on a matter of Faith or morals, and ONLY if he speaks Ex Cathedra is he Infallible. I know of only twice...the Assumption and the Immaculate Conception, that he has done so.
When the Pope speaks on many other things, he does speak as head of the catholic church, but he is as subject to error as anyone else...global warming is the latest...and it is strictly his human opinion....rest easy.
Well, you didn’t give a Biblical justification for this belief in papal infallibility, you just said it’s only happened twice so far.