a question about photoshop files

how to do that when we create thumbnails, the results so when the file is enlarged is not broken.
because I feel when I make a thumbnail with a size of 300dpi when I enlarge the file it is not clear

A thumbnail with 300dpi? 300dpi is only needed for print, 72pdi should be all you need for most digital only files.

No matter what, if you create something at a smaller size, then try to scale it up, it will always lose quality, unless it’s a vector object. If you know that you want to have something at multiple sizes, then you should first create it at the largest size, then scale it down.