I worked and samed the photos on my hard drive. I was told to remove the photos from the hard drive because it make my computer slow. I move all my photos to an external hard drive and when I try to open them on lightroom it gives me a message "file could not be
The process you need to follow, as explained in the two links from Gary, is to tell Lightroom Classic the new location of the photos.
"I was told to remove the photos from the hard drive because it make my computer slow."
Well, the only situation where this is true is if there is very little free unused space on the hard drive. Otherwise, there's no problem leaving photos on a given drive. So in general (with one exception), I would say photos on the internal hard drive DO NOT make your computer slow.
As far as where you put the photos, if you don't want them on the internal hard drive, don't put them there in the first place. When you come home with new photos in your camera, have Lightroom Classic import them and place them directly on an external hard drive, they never have to be placed on the internal hard drive.