photo JPG VS photo PNG

photo shows a man sitting on the road, against the backdrop of the Monument Valley in Utah (JPG 640x480) photo shows a man sitting on the road, against the backdrop of the Monument Valley in Utah (PNG 640x480)

When optimizing a photo for the web of JPG or PNG, I didn't notice any difference. The only difference is the size of the file itself.
JPG 300 KB (308,201 bytes)
PNG 490 KB (502,453 bytes)
So, PNG is not the best format to optimize photography for the internet.

logo GIF VS logo PNG

logo. At the heart of the logo is a triangle, there are also circles, and elements of fire, a drop, explosions, 
		      and a first and last name (GIF 640x480) logo. At the heart of the logo is a triangle, there are also circles, and elements of fire, a drop, explosions, 
		      and a first and last name (PNG 640x480)

PNG format optimization was more successful, since the image is very smooth and without pixels,
but JPG lost quality during optimization and pixels appeared around the edges of the image.
GIF 23.6 KB (24,167 bytes)
PNG 53.0 KB (54,306 bytes)
So, the size of the PNG is larger, but at the same time, I like how smoothly each element of the logo was optimized. Therefore, it is better to use PNG for the logo than GIF.

transparent PNG VS PNG with background

logo. At the heart of the logo is a triangle, there are also circles, and elements of fire, a drop, explosions, 
		      and a first and last name (GIF 640x480) logo. At the heart of the logo is a triangle, there are also circles, and elements of fire, a drop, explosions, 
		      and a first and last name (PNG 640x480)

Without transparency, PNG has a background color and a larger file size. And also such a file cannot be applied over another image.
PNG 53.0 KB (54,306 bytes)
PNG w/o transparency 69.1 KB (70,775 bytes)

animated GIF

a funny animation. photo shows a man sitting on the road, against the backdrop of the Monument Valley in Utah. 
		      And then a painted UFO comes and takes the man (GIF 640x480)

I made an animation of a UFO that comes from the upper left side from behind the mountains, and gradually increases until it becomes large from the upper right, then the UFO releases a beam and takes the person to the party. I used Photoshop to create the animation.