It takes some time to learn to manage your students well and some develop a great set of skills sooner than others. It took me a while and I know that I was not very strict or confident in my early years of teaching. I used to focus more on building relationships with my students than anything else. I still believe that building relationships is integral to good classroom management but not the only tool in my toolbox.
I came across this image on Twitter which sums things up nicely.
Thanks to @WeAreTeachers for this image.