They put him in custody because it was not clear what should be done to him.
When Moses’s father-in-law saw all that he was doing for the people, he said, “What is this that you are doing for the people? Why do you sit alone, while all the people stand around you from morning until evening?”
Moses said to his father-in-law, “Because the people come to me to inquire of God.
and they put him in custody, until the decision of the Lord should be made clear to them.
Those who found him gathering sticks brought him to Moses, Aaron, and the whole congregation.
Moses said to them, “Wait, so that I may hear what the Lord will command concerning you.”