There is no hard and fast rule for the naming of children.
Traditional Ulster-Scots naming pattern was first son after father' father, 2nd son after mother's father and 3rd son after father. With girls it was first daughter after mother's mother, etc.
However, only some families did this and even in those families it could get changed. For example, both grandfathers (and sometimes father) have same Christian name so oldest son might get that name but from 2nd son onward other names used. Or one of the sons (maybe even the eldest) was given mother's surname as his first name rather than grandfather's Christian name. Or both grandfathers have different names and the two are both used for eldest (or another son). Children were also named for local doctors, clergymen, teacher, landlords, better off relations, etc.
Sometimes it is more helpful to look at a whole family and see if any of the children of a couple have used the same first names for their offspring. In my husband's family a surname has been used as a first or middle name for generations and by tracing each branch back to where the name first appears I was eventually able to discover which ancestress had it as a maiden name.