I like both. Until recently, I had a dog for sixteen years, along with a cat for ten years. The dog had to be put to sleep due to old age a month ago. The cat is alive and well.
Knowing what I know now, I would choose a cat over a dog. Not because I like cats more than dogs, but because of the responsibility you take on when owning a dog. The biggest issue for me was not being able to spend time away from home because of the need to let my dog out to do his business.
When you are thinking about owning a pet, you should consider the time and effort that must be put into keeping them happy and taking care of their welfare, which includes exercise and restroom breaks, grooming and trimming their nails, cleaning and upkeep of your home. These things impact your life in ways you may not have thought about, if you've never owned a pet before or had sole responsibility for one.
A cat can be left alone for weeks on end, as long as they have food and water and a place to go. A companion is even better and ensures they won't spend their days sleeping while you're gone.
If I were to pick one? I miss my dog for sure, but I don't miss the responsibility. Will I ever own a dog again? Right now the answer is no, but I miss my little boy. Will I ever own a cat again after this one is gone? I don't know. I hate cleaning cat boxes. lol
Again, I like both cats and dogs, but there are things about both that need to be considered before owning them. They are a long-term commitment.