When Jacob learned that there was grain in Egypt, he said to his sons, "Why are you staring blankly at each other?
References for Genesis 42:1
I've just heard that there's grain in Egypt. Go down there and buy some for us so that we can survive and not starve to death."
So Joseph's ten brothers went down to buy grain in Egypt.
However, Jacob didn't send Joseph's brother Benjamin along with his brothers because he thought something bad might happen to him.
Israel's sons came to buy grain with others who also came since the famine had spread to the land of Canaan.
As for Joseph, he was the land's governor, and he was the one selling grain to all the land's people. When Joseph's brothers arrived, they bowed down to him, their faces to the ground.
When Joseph saw his brothers, he recognized them, but he acted like he didn't know them. He spoke to them with a harsh tone and said, "Where have you come from?" And they said, "From the land of Canaan to buy food."
Joseph recognized his brothers, but they didn't recognize him.
Joseph remembered the dreams he had dreamed about them, and said to them, "You are spies. You've come to look for the country's weaknesses."
They said to him, "No, Master. Your servants have just come to buy food.
We are all sons of one man. We are honest men. Your servants aren't spies."
He said to them, "No. You've come to look for the country's weaknesses."
They said, "We, your servants, are twelve brothers, sons of one man in the land of Canaan. The youngest is now with our father, but one is gone."
Joseph said to them, "It's just as I've said to you. You are spies!
But here is how to prove yourselves: As Pharaoh lives, you won't leave here until your youngest brother arrives.
Send one of you to get your brother, but the rest of you will stay in prison. We will find out if your words are true. If not, as Pharaoh lives, you are certainly spies."