From the iPhone User Guide:
(iPhone X, iPhone 8, iPhone 8 Plus, iPhone 7, and iPhone 7 Plus) To save space, iPhone captures photos and videos in new high-efficiency formats called HEIF and HEVC automatically. To change image and video format settings, go to Settings > Camera > Formats, then choose either High Efficiency (saves more space) or Most Compatible.
The new formats that Apple is using take about half the space that the old formats used and take better pictures. This article gives good information about the new format. https://www.macworld.co.uk/feature/iphone/what-is-heic-3660408/
If you send photos and videos often, then selecting the Most Compatible option is probably the best but you will be trading off in that they will take up more space and won't be as high quality. If you mainly take pictures for your enjoyment and typically only view them on your iPhone, leave them on the new High Efficiency setting. Of course you can use the HEIF and HEVC formats and send them to people but there will be a delay on sending them so that they can be converted.