yEd's Neighborhood view only ever displays the immediate neighborhood - i.e. those nodes that are directly connected to the selected nodes.
However, you can use "Tools" -> "Select Elements" with "Nodes" tab options "Use These Criteria" enabled, "Select" set to "Neighbors of Selected Nodes", and "Max Path Distance" set to "1". Additionally, enable "Clear Selection First" on tab "General". This should then select all direct neighbors of your original selection. The Neighborhood view for the newly selected nodes will then display the desired distance 2 neighborhood of the original selection.