1 Nephi 13:41 says; “…there is one God and one Shepherd over all the earth.”

If there’s only one God over the earth then what did Smith mean when he said the “trinity” is made up of 3 gods?

Teachings of the Prophet Joseph Smith, pg. 370; I will preach on the plurality of Gods. I have selected this text for that express purpose. I wish to declare I have always and in all congregations when I have preach on the subject of the Deity, it has been the plurality of Gods. It has been preached by the Elders for fifteen years. I have always declared God to be a distinct personage, Jesus Christ a separate and distinct personage from God the Father, and that the Holy Ghost was a distinct personage and a Spirit: and these three constitute three distinct personages and three Gods.