Loneliness and anxiety

I’ve always been anxious, my doctor suggested me Prozac after my diagnosis because it was getting out of control. I don’t love it and I would like to get off of it. Does anyone have good experiences with getting a pet (dog or cat) that will help with loneliness? I was thinking about getting a dog but I don’t know if I can keep up with the energy and cats don’t seem as affectionate