What is Raster image?
A raster image is made of a fixed grid of pixels, such as a photo, so it loses sharpness when enlarged too much.
JPEG, PNG, WebP and GIF are raster formats. To keep an image sharp at a larger size you need more pixels in the first place, or a vector version such as SVG.
When you shrink a raster image it usually stays clean, but when you enlarge it the software has to invent pixels and the result looks soft or blocky.