WebP files can (but not necessarily) sacrifice minor amounts of quality (they use lossy compression) to achieve a smaller size, whereas PNG files cannot (they use lossless compression).
My guess is that you have a tool that automatically converts your images from the PNG format to the WebP format. Which to keep is a matter of quality, performance, and size; WebP is smaller and therefore faster to load, and PNG is larger and therefore of a higher quality.
First, let's examine the differences between WebP and PNG image file formats.
According to Wikipedia, PNG (Portable Network Graphics) is
"a raster-graphics file format that supports lossless data compression."[1]
and WebP (Web Picture) is
"a raster graphics file format developed by Google [that] supports both lossy and lossless compression[.]"[2]
Let's unpack what all of this means. Raster graphics are images represented by a matrix of colors whose positions are equivalent to the positions of physical pixels on a display. In short, a raster image is a grid of RGB values that form an image.[3]
Now for the "lossless data compression" part of that description. Data compression comes in two flavours: lossy and lossless.[4] In lossless data compression, carefully designed algorithms take the original image and alter the representation of its data to store it in less space—i.e., compress the data without any loss.[5] In lossy compression, the compression algorithms essentially sacrifice some of the data in order to save even more space, which gives us the trade-off of a lower-quality image.[6]
In essence, a WebP file may (but not necessarily) use lossy compression to achieve a smaller size—and therefore be of a lower quality—than a PNG file.
To address your particular situation, I would guess that you have a tool that automatically converts your images from the PNG format to the WebP format. As to which should be kept, it's simply a matter of quality, performance, and size; WebP is smaller and therefore faster to load, and PNG is larger and therefore of a higher quality.