The extension is not the whole story
JPG and PNG can both hold a good image, but final quality also depends on pixel dimensions, the original source, and compression. Converting a tiny image to PNG does not create detail that was never captured.
JPG suits many photographs
Photographs with many color gradients often work well as high-quality JPG files at a sensible size. If printing matters, avoid repeatedly saving the same JPG with aggressive compression because each lossy generation can remove more detail.
PNG is strong for sharp edges and text
Logos, diagrams, and screenshots with crisp edges can benefit from PNG because it is lossless. A large photographic PNG, however, may be much heavier than necessary without producing a meaningful print advantage.
Judge quality at the intended print size
Compare pixel dimensions with the physical size you intend to print. An image that looks excellent on a small screen can look soft when printed large. For professional work, ask the printer for their preferred resolution and color requirements.
Relate pixel dimensions to the printed size
Pixel count only makes sense together with the intended physical size. A 3000-pixel image may be excellent at one size and limited on a large poster. If the printer gives you a target PPI or DPI, use it with the real dimensions instead of changing the file extension and hoping it will make up for missing resolution.
Ask about color requirements for color-critical work
Ordinary home printing may need little more than a careful preview, but color-critical commercial work can require a specific profile or printer guidance. Do not convert everything to a different format at random before learning what the print provider expects.