I went through your file. You have duplicated the top part of the cube wayyy too many times, but since it in the edit mode you might have not understood it. So probably don't do anything with that right now.
Now I don't know that video, but to only seperate the upper part, you first need to duplicate it using Shift+D and then right after that, without doing anything else, click P and choose Selection. This will seperate the duplicated mesh.
Just in case you plan to not make the entire original mesh once again, this is what to do.
So first thing first you are going to have to clean up this duplicated mess. Click on one the vertices. Now click Ctrl+L. This will select all linked vertices and now click Ctrl+I to invert the selection. Finally click X and select vertices from the options.
Now go to object mode and position it back to where it roughly was. Try to be precise as this will help. Now joint the two meshes using Ctrl+J. Now go to edit mode click M and select merge by distance.
Now to seperate, select the upper part, click Shift+D to duplicate and then right after that, without doing anything else, click P and choose Selection. This will seperate the duplicated mesh.
I would suggest you to do the entire thing once again from scratch, as since you are a beginner you might mess up with the joining if the merge by distance doesn't work correctly.