Installing Docker on ubuntu server please help! Newb here

Hello I have been trying to install docker on a new clean ubuntu server installation. Ive read the doccumentation and watched a few videos, My issue is when following the directions off the docker website (Install Docker Engine on Ubuntu | Docker Docs) the command to actually install docker it gives me a bunch of errors saying that package cannot be located (sudo apt-get install docker-ce docker-ce-cli containerd…io docker-buildx-plugin docker-compose-plugin. but “docker install” shows the snap pack, docker…io and podman-docker.
Im worried by not installing by manufacturers instructions i will be missing pckg’s or something that will give me issues later on and not being able to diagnose due to incorrect installation. Thoughts? or any heads up on how to do this “properly”?

Okay for anyone else this fixed it for me. Instead of just copying and pasting the WHOLE code, you have to go line for line. i dont know why but finally got it working lol.