Scripture seems to indicate a special relationship between Mary and Elizabeth. Perhaps they were well acquainted with one another, but rather than God saying “your friend Elizabeth” He said “your cousin Elizabeth” to emphasize the the fact that as “children of Israel” they were related.
We don’t know what if any relationship existed between Elizabeth and Mary prior to this event. But Luke 1:7 tells us Elizabeth was well along in years, whereas Mary was probably a teen aged girl. Also Elizabeth lived in the hills of Judea (Luke 1:39-40) near Jerusalem while Mary lived in Nazareth (Luke 1:26) a difficult three day journey away. They were also from different segments of society. It seems unlikely that a social relationship could have developed spontaneously.
I think their initial meeting was prompted by the Holy Spirit, and was based on the two miraculous pregnancies. Elizabeth knew John would announce the coming of the Messiah and Mary knew she was going to be His mother. I don’t see any other connection being mentioned in the Bible.