Related to, and evolved from, are two different things.
Dogs did NOT evolve from wolves....that is ignorant.
There are still wolves. smh.
Not all wolves needed to evolve into dogs.
Tribes of primitive people befriended “friendly” wolves who hung around their huts because they usually received scraps of animals hunted for food. Those wolves did not need to hunt anymore, and became part of the people “pack”.
Ah ha!! You are beginning to understand evolution. The “parent” species need not, itself, go extinct.