It’s not too hard. Yes, you’d want tax exempt 501C papers. Info available online. In NY it took about 3 months for one, when the church turned the food cupboard over to new leadership.
Bylaws are required. They can be as simple or as complicated as you want. Simple is good. Less to hang yourself with.
Connections. You have to know people, where to get stuff, and be able to delegate and get people to work.
Working at a food pantry is a great way to learn. Lots of helpful people on both sides of the counter.
Foodlink in Rochester has a wealth of information, training info, requirements for food handling, etc. Lots of online stuff. I don’t have a password right now, but maybe they’ll give you access. If you’re serious, I can probably get you a password.
You can find almost everything, info wise, online. Read and see what others do, and pick out what would work best.
edit- Foodlink, member services. Good start.