If you have the same topology, even the vertex indexes, it is relatively easy:

[![enter image description here][1]][1]

You can use *transfer attribute* in *Index* mode:

[![enter image description here][2]][2]

The problem may occur if you have the same topology, but the indices are messed up. In this case you can try to use *Transfer the vertex order* add-on:

https://bartoszstyperek.gumroad.com/l/copy_verts_ids

If two meshes have different vertices positions use editmode Copy vert ID from sidebar:

[![enter image description here][3]][3]

 First you need to select two, adjacent faces on source mesh - copy mesh id's, and then, select two similar faces on target mesh and paste IDs. Operation has to be repeated for each island (disconnected mesh parts)  separately.


  [1]: https://i.sstatic.net/Yi1OF.gif
  [2]: https://i.sstatic.net/Il7jH.png
  [3]: https://i.sstatic.net/Rb6aG.png