Y-DNA is the genetic material that is handed down from father to son - mostly unchanged. The key word is "mostly." Since Y-DNA changes slowly, we can use it to determine how closely related the paternal lines of two men are likely to be. (Women are not left out - you can have a brother or cousin or some other male relative test for you.) The number of changes in the Y chromosome can give you an estimate of how far back you had a common ancestor. It's only an estimate - for example, a 90% chance that your common ancestor lived 7 generations ago. This fact can be used to group Mennonite men of the same surname into groups who are more closely related to each other.
I have tested myself for my Fast line and my maternal uncle for my Siemens line. All the Mennonite Fasts test previously had proven to be closely related to one another. (By closely, I mean that the earliest ancestors of these Fasts in the 1700s were probably distant cousins.) And my Y-DNA test showed the same. My earliest known Fast ancestor, Gerhard Fast #660202 (1739-1828) was related to all the other Fasts tested. In fact, the common ancestor of all of them might have lived in the 1600s or perhaps 1500s.
This means that I can profitably pursue researching any of the Fast lines to try to get them to connect.
This is a schematic of how I think the Fast lines in West Prussia in the 1700s connect. Say that the red line traces my ancestry back to Gerhard Fast #660202 (1739-1828). The other solid lines are known ancestral lines that connect back to the other Fasts in West Prussia. At the top of each line, for example, would be one of the 33 Fasts in the 1776 census of Mennonites in West Prussia. We don't know how any of them relate based on genealogical proof. But based on Y-DNA results, we can be pretty sure that they all go back to some common Fast ancestor who lived 100-200 years earlier. The dotted lines represent the pedigree chart going from the current known ancestors back to the earliest Fast, the generations we don't know yet. So if I work to connect them, it's not a wild goose chase because they should all connect at some point.