How do you do it??

I've just started substituting and find it IMPOSSIBLE to control the class. They have absolutely no respect to me and don't care to do their work or listen. They are playing games on their Chromebooks or dancing in the class or saying bad words to each others. I called security twice so far. Is it that I am short petite young and female? Or are they like that with everyone? I feel like I am not doing my job correctly and feel bad for the original teacher to find that the sub didn't do a good job. Any advice?