There were actually 13 tribes, not 12, since Joseph split into 2 tribes: Menassah and Ephraim, and the tribe of Levi exists to this very day.
Yea I know about the 13th tribe of Levi as well. I just didn’t want to confuse the issue by adding that in. When the tribes are talked about it is generally the 12 tribes.