Joseph is now the top dog in Egyptian agriculture. Well, probably Anubis was the top dog, but he was more a jackal-headed mythological guy. There has been some pushback in the historical world about Joseph and the lack of definite recording of anyone as a true "second-in-command" or grand vizier or prime minister in any part of Egyptian history that would fit the description of Joseph. There are a couple of possibilities that would explain that, but the simplest one is this: Joseph is made "second to Pharaoh" in the realm of agriculture/disaster preparedness. That does not put him in charge of the military or the religion or many other tasks. In a modern sense, that would make him like the Secretary of Agriculture in the US Cabinet.
Except that he would have the power to execute you if you did not do what he said. That is not a power we want any single government official to have. Joseph had it, but we do not know if he misused it any. Scripture does not give us all the details. (On Joseph's authority, consider this question: the Joseph events happen around the time that the term "Pharaoh" settles toward the meaning of the one king of Egypt from meaning the "great house" of Egypt, where the ruler comes from. It is possible that Joseph is second to the "house," that is, second to the royal family.)
Joseph leads the nation of Egypt to stockpile food for the coming season of want. They store up grain to enable replanting the crops each season. That was one of the main dangers of crop failure: think about where the seeds for next year come from. They come from this year's crops! So if the crops are short, one must remember to reserve some anyway. Further, given what we now know about crop genetics, another factor that comes through here was unknown to Joseph: perhaps the famine was part of a blight or crop disease. And by replanting from older stock, they were able to raise crops that did not have those characteristics.
Meanwhile, Joseph has married and had two children. Manasseh and Ephraim will be more important later. We now have four named people in the story: it's all of the family of Joseph. Asenath, his wife, Manasseh, Ephraim, and Joseph are the focus of the story.
The people of Egypt come to Pharaoh for food, and he sends them to Joseph. Likewise, many of the nations around Egypt send envoys to buy grain from Egypt. Some of these may have been in one-year crop failures, but others were facing a longer-term problem. Genesis 42 opens on Jacob, showing that the famine was also severe in the land of Canaan. (It's not properly Israel yet.)
Jacob sends ten of his sons to Egypt for food. They are brought before Joseph, and he begins to test them. Joseph imprisons Simeon and lets the rest of the brothers return home with grain. He warns them not to come back without Benjamin.
Meanwhile, they know in their hearts that the trouble they are facing is because of their treatment of Joseph. Joseph states that his test is to determine their honesty--the one thing they all know they lack.
That is, unfortunately, where we all tend to get hit: right at the point of weakness. This is why it is so important to dwell in honest community with your fellow followers of Christ. One person's weakness is another's strength, so we need each other.
Let that be one of the lessons you gather here: together, we can either scheme and destroy as Joseph's brothers do, or we can encourage and strengthen one another. The choice is ours.