When a PNG copy of a JPG helps
Every time a JPEG is edited and saved again it loses a little more detail. PNG is lossless, so a PNG copy can go through many rounds of edits without new artefacts, and some upload forms and design tools ask for PNG specifically. For posting a photo on social media there is no gain: the file gets bigger and the platform re-encodes it anyway.