Size is definitely an important factor to consider when deciding if your dog can socialize with another dog. However, there are a number of factors that should be considered like age, temperament, gender, and others.
Also, just because 2 dogs are a mismatch when it comes to size, doesn’t mean they should not be allowed to socialize at all. Meeting dogs of all different shapes and sizes will help your dog with their socialization. Just make sure these meetings are properly supervised. Here we see Zoellie and Herbie checking each other out.

Great!!