I think you might mean "How to make a dog sweater?" Here's how.
First, you need to measure your dog. Measure the length from the base of the neck to the base of the tail, the chest girth, and the neck girth. Then, choose a suitable yarn. Soft and warm wool - like acrylic yarn is a good choice.
Next, you can use knitting needles or a crochet hook to start knitting or crocheting according to a pattern you design or find. For example, you can knit a simple tube - shaped sweater first and then add holes for the legs and neck. Make sure the sweater is not too tight so that the dog can move around comfortably. After finishing, check the fit and make any necessary adjustments.