Twelve is the number of foundation.
Jacob had twelve sons. These sons became the heads of the twelve tribes of Israel. The foundation of God's chosen nation.
Jesus chose twelve apostles. This reflects back on the twelve tribes, but these apostles are the foundation of the church (Ephesians 2:20).