The designator nextSibling describes the sibling note in $OutlineOrder after the note in current focus; the next note on the same level, i.e. excluding children.
nextSibling is a more closely designed test than next as the latter may be at a different outline depth.
nextSibling will not match an adornment, separator, or item set to not export, but see nextSiblingItem.
See also—notes linking to here: