Apple introduced HEIF on iOS devices in September 2017 with iOS 11 on mobile devices and macOS 10.13 macOS High Sierra on the Mac. As you can see in linked documents provided by K Shaffer the Setting > Camera > Formats on your iPhone determines , if the Camera will save new photos in the space saving High Efficiency format HEIF or or as larger JPEG files for more compatibility. when now all new files are in the High Efficiency format, the setting "Camera > Formats" may have been changed from "more compatible" to "High Efficiency" when you installed a system upgrade. System upgrades will sometimes change the Settings if the default has become changed.
You may want to change the Settings > Camera > Format back to "Most Compatible", if you prefer JPEG to HEIF, but then your new photos and videos will need twice the storage on the device and in iCloud. I prefer HEIF because of the better compression at the same quality.
What I cannot recommend to do is to change the Settings > Photos > Transfer to Mac or PC to "Most Compatible". With this setting all HEIC files will we converted to JPEG or H.264 when you download them to a computer. But it will disable the duplicate detection when importing the photos to from the iPhone to Photos for Mac. So you will have to select the new photosto be imported manually and cannot rely on the duplicate detection to prevent already imported files from being imported again.