How can I "unsplit" (ie reconnect) vertices that I split (not separated) from mesh in edit mode? Hopefully I can upload this video to show what I mean.
I add a cube, go into edit mode, extrude a bit. Use Y to split some of the mesh.
Move the split part away a bit. Then move the split part back.
Now I want to reconnect the split part to the main mesh.

So here I am not talking about two objects at all. It's all one object.
I am not talking about separating part of the mesh to new object.
I do not refer here to merging vertices either.
I mean the opposite of splitting. And I do not mean joining two objects.

Maybe there is a simple way I am overlooking.
Maybe Face> Intersect (Boolean)> Union?
Maybe Edge Loops added in exactly the right places, then merge by distance?

Here's where I'm asking if there's an easy way to sort of
"unsplit" some vertices that I had previously split (Y) from a mesh
while in edit mode.

Thanks for any ideas.

Note:I could not find a way to upload a nice little video to show what I mean, so here's at least a picture.

Edit_1:

Thanks for you ideas. In a bit more complex situation with the mesh, as this gif shows, how would one reconnect, or merge these two "unlinked" ? "islands" ? of vetices? Note that L selects linked vertices, so here I have some "unlinked" vertices. so my question is, how to get them back linked together so that L will select them all? Thanks for any other ideas to try. This is my first attempt to make and upload a gif to show what I mean.
I think you are overcomplicating it way too much. If you only want the shape that you uploaded a picture of, it can be done in just 2 steps:

1: Inset the top face of the cube by pressing I.

2: Extrude the inset face up by pressing E.