The same format with two names
JPEG stands for the Joint Photographic Experts Group, the committee that created the format in the early 1990s. JPG is the same format with a shorter name. Both extensions point to identical lossy compression, identical quality settings, and identical pixel data inside the file.
A file named photo.jpeg and the same file named photo.jpg are interchangeable. Rename one and every program treats it exactly as before. There is no conversion step, no quality change, and no hidden difference in how the image itself is stored.
Why both extensions exist
Early versions of Windows used three-letter file extensions, so .jpeg was trimmed to .jpg to fit the limit, and the habit stuck. Cameras, phones, and websites now produce both spellings, and the choice usually depends on the software that wrote the file rather than anything about the picture.
Some programs offer one spelling in their export menu, and some upload filters search for .jpg only. That is a quirk of the tool, not the format. Under the hood, the bytes are the same either way, so a filter that accepts one accepts the other after a rename.
What actually matters
Because the formats are identical, pick JPG or JPEG for consistency with the rest of your files and move on. The decisions that change how an image looks are the quality setting, the pixel dimensions, and whether the file gets re-saved many times.
If a JPG or JPEG needs transparency, or has to become a different format entirely, convert it rather than renaming it. Renaming changes the label; conversion rebuilds the pixels for the target format, and that is the only step that changes anything about the image.