Basically, bearing children is one of the primary roles of a woman in this time, especially sons. It would be considered a curse or severe misfortune to not have any children, and as we will see later it causes a lot of stress in their marriage. What modern readers need to understand is the sense of shame or embarrassment that would come from being a barren woman.
The third factor is economic. This is a complicated issue so I will be very brief. Having sons is a safety net because the expectation is that your sons will take care of you when you are old and cannot support your own herd/farm. Your sons (and in later Israel, daughters as well) inherit your property, and they ensure the continuance of your name and your family bloodline. They also will aid you in labor, in particular when running a farm. Farming is very labor intensive, and it is cyclical. While all the evidence is that Abram and Sarai were primarily nomadic herders, the later Israelite people were clearly agrarian. As such, the agrarian themes and farming patterns recur almost continuously throughout the OT, so it is important to learn them early and recognize them when they appear.
One of these patterns, the one relevant to this discussion, is the importance of children. You need to have children to help run your farm, because they are the labor that will help to plow, sow and reap crops. While many Israelite farmers hire (or sometimes buy) other workers, your children work basically for free since you don't really have to pay them wages.
So, that's the short version of why barrenness matters, both practically and symbolically. It is used in the bible in both ways (as a literal story element and as a symbolic element) quite a few times. Practically it matters because of the stigma and economic implications, symbolically it is even more complicated but I don't have the time to discuss it fully here.
Moving on, I have to admit that my mind is divided. On the one hand, I want to try to move fast through these chapters so that I have a sense of progress, and can give a sense of progress to my readers. To get bogged down so early would make it seem like I will never finish. Yet at the same time, the story of Abraham is truly one of the most inspirational stories in the bible to me, so I hesitate because there is a lot I want to say. I will probably go with my instinct, which is to write at great length about Abraham. It will slow me down, but that's the price of reading Genesis.
So up til now, we have mostly just seen the introduction. The characters are described, and they took a trip down to Egypt (and were expelled back up). In this chapter the story continues in an interesting way, with a war between two coalitions of kings.
To the best of my knowledge, none of these kings have been identified in non-biblical sources, but that shouldn't be too surprising because we haven't even found the cities of Sodom and Gomorrah at all. Also, it might not be clear to the reader (depending on what bible version you use) but Shinar is the Hebrew name for Babylon. Sodom, Gomorrah and Bela are all in the Jordan plains, so it's clearly a regional coalition. Elam and the associated nations are an empire of sorts, ruled by Elam and with the others subservient.
While the battle itself is not described, it says the kings of Sodom, Gomorrah et al fled, and so you know they lost. We also know that because it is a battle of 9 kings, it was probably a (comparatively) very large battle. Then the relevant part happens: they take Lot captive. Captivity would not be a pleasant thing. In the worst case, he would be executed, and in the best case, he would be enslaved somewhere. So when Abram hears this, he goes to rescue Lot. He is also allied with the men who live near him in Canaan, some Amorites.
This is really interesting to me, because at this point one would think that Abram had known of Sodom and Gomorrah's reputation, but he is still willing to fight on their behalf to save his nephew. In Abram's life, he is the forefather of the nation of Israel, but that means that in a biblical sense, he is the only righteous man in Canaan at the time (and then there is Lot, but Lot is in the Jordan plains outside of Canaan). So in that sense Abram is very much like an NT apostle, breaking new ground in the faith. In fact, he is pretty much the first member of the Jewish faith entirely. In that situation, he makes a number of alliances with non-righteous people, like Mamre and to a lesser extent, Sodom and Gomorrah. Similarly, Lot aligns himself much more strongly with Sodom and Gomorrah. All of God's commands later to the Jewish people revolve around purity, both in how they practice their faith but also how they should separate themselves from the people of the world in righteousness, marriage and political affairs. Basically, the idolatry of other peoples would snare the Israelites into practicing the same idolatry, and dangerously undermine their faith in God. Rarely did the Israelites practice such purity and separation, but God speaks of it often.
The life of Abram predates all of these commands, but his life does not predate the spirit of those commands, which is to live in devotion to the Lord. I can certainly understand the pragmatic motivation for such alliances, as Abram clearly needs allies in his new homeland, but I do wonder if this was the right decision in light of what God had spoken and Abram's intrinsic sense of what he should do to honor God. Similarly, many scholars question Abram's decision to lie about Sarai when he went to Egypt, because lying to protect yourself implies a distrust towards God, who is ostensibly Abram's protector; and God proves himself to be Abram's protector by the plagues he unleashed on Pharaoh. So after the plagues on Pharaoh, one would wonder if Abram should be more trusting of God, and again Abram's alliance with Mamre implies distrust towards God who is his protector, and that Abram is not doing the right thing by allying with the wicked people he has more or less come to supplant (and his descendants eventually will supplant the Amorites).
With all that said, we still see the favor of God upon Abram, as Abram routs a very large army (unstated size, but the men under 4 kings including the very powerful Elamites) with just 318 men. This is not impossible (see the movie 300 for another example), but it would certainly be considered an example of the favor of God. Victory in battle is usually a proxy for divine favor, as the victory or defeat of an army is considered the victory or defeat of their patron god. As such, a small group beating a large one clearly shows that the small group's patron god is stronger, because there is no "natural explanation" for their victory. For another example of this, read the story of Gideon in the book of Judges (I'll get there eventually). Abram rescues Lot, but we also read that many other people had been captured and were now freed as well, as well as some material possessions.
Next we see a very interesting element, which is when Abram returns he is greeted by the kings and blessed by Melchizedek, the king of Salem and also the "priest of God Most High". God Most High is considered by some to be a reference to a pagan deity, and also Salem is another name for Jerusalem. It would certainly be very unusual for a pagan like the king of Salem to be a priest of the true God, and yet there's more to the story than just this. Later in the bible, Melchizedek will be referenced in the Psalms (Ps 110) and also in Hebrews, chapter 5 and 6. If you want to read about it at length, you can check out here.
Long story short, Melchizedek is considered either a symbolic representation of Christ, or a Christophany (appearance of Christ himself before his human incarnation). Personally I lean more towards the former than the latter. Given how he interjects into the scene and has a defined role as king of a city, it would make little sense for him to be anything but a human being with a real life and real subjects, because otherwise it would be a challenge for him to have any meaningful relation to the other kings who are present. Surely the kings of other cities would be familiar with the king of Salem.
Anyway, Abram gives Melchizedek a tenth of the plunder, returns the rest to the various kings and to his allies Mamre et al, and then goes home, happy to have rescued Lot.