You seem to be a very novice programmer.
how do I setup my dev environment
? Google that? Use a devcontainer? I mean literally a question answered thousands of times.
where should I start
Setting up your dev environment. Then maybe create a few projects for you to test your package manager empirically?
do I invent my own pkg format or do I use pre built packages like deb or rpm?
Depends on what you want to do. I'm honestly not sure how to help you here? What kind of answer are you fishing for here?