I'm really at a loss

So I had my baby 4 months ago, before getting pregnant I wanted a baby so bad but right now so worried about how to discipline my child when they get older, I grew up getting abused and yelled at for every little thing. I do not want to be like that as a parent, I really don't want to hit my child but then again I want them to respect me and know i mean business when they do something bad. Any recommendations ? I know parenting is just something you learn but I just want to always be loving and supportive to my child but I also don't want them growing up doing whatever they want. Help!