I suspect there's something going on here that you don't understand. Your camera doesn't have a DPI setting. I can't find anything called "DPI" in photos taken by my camera (R5). Even if it was there, and if the camera set it to 72, it would make no difference because it would just be ignored.
When you print a picture, you decide whether you want it to fill the page, or take up some space on a page, or whatever. This determines the DPI it will be printed at. So if you're not getting the results you expect, I suggest you look at how you're doing your page setup. There's nothing in the camera that can affect it. The images the camera takes just have however many pixels; how those pixels get mapped to inches is all about your page setup when you print.
Of couse if you're just looking at images on a screen, then DPI is even less relevant, because the screen can be whatever size.
You can set the image quality your camera takes, which determines the number of pixels in the image -- you'll find this in the menus. I always set it to the max, because there's just no reason not to. I would tell you where to find this in your camera's manual, but you didn't mention what camera you have.
What are you trying to achieve? If you open your image in a browser or on a phone etc., it will open based on how many pixels there are in the image and how many pixels make up your monitor. So let's say your image is 1920px by 1080px, it will completely fill a 1080p screen, but will take up 1/4 of a 4K (3840px x 2160px) screen.
You can assign a PPI (pixels per inch) value to tell your printer how large to print your image. If you want to print a 6" x 4" photo and you want 300ppi to get optimum print quality on a particular device, then you can resize your image to 1800px x 1200px at 300ppi in Photoshop, Affinity Photo etc. If you inadvertently set it to 1800px x 1200px at 150ppi then you would be telling your printer to print the image at 12" x 8" (12x150 = 1800px, 8x150=1200px).
DPP has a field in the Preferences to set images exported from DPP at any PPI you like (see image below). I think it defaults to 240ppi, but you can change it. This won't really achieve anything and would mean you are missing out on the superior features of LR or CaptureOne Pro etc.
Adding a bit more to the already-excellent answers provided earlier. Perhaps this will add additional clarity.
Any DPI value as stored in any metadata in images are just hints. It could be that cameras are filling in that metadata value to be 240 or whatever other value.
Think of DPI as speed (e.g. MPH or km/h) in that it doesn't tell the entire story. If I told that you I drove 60 MPH, you wouldn't know either how far I drove (distance) or how long I was driving for (time). At least one of those values (distance or time) would be required.
Similarly, if you have a DPI value of 300, you need at least one other value (either pixels of the image or physical size you want the image to be).
Example: If your goal is to generate an 8 x 10 inch print with exactly 300 DPI, this would mean you need your image to be 2400 x 3000 pixels.
In ancient times, a pair of resolution numbers in an image were used as hints for printing or display. I would guess that they are never used now. I expect these resolution number are a left over from ancient times. Then, computers were not fast enough and algorithms were not good enough to scale an image and some thought that an image should be displayed at the original size that it had on paper. It was also sometimes helpful to set the resolution numbers to the actual printer resolution to keep the printer from doing a bad job of scaling the image using a poor quality algorithm built into the printer.
My camera puts the resolution into the meta data as 72 for both CR3 file and JPG file, but if I edit the image in DPP, the resolution is changed to 350 when I save a JPG file.
exiftool will display these numbers
exiftool -s -G0:2 -resolutionunit -xresolution -yresolution /Volumes/jrm/photos/2023Jan16/IMG_2403.JPG
[EXIF:Image] ResolutionUnit : inches
[EXIF:Image] XResolution : 72
[EXIF:Image] YResolution : 72
exiftool might also be used to change these numbers in case some printer or display actually uses them.
DPI in metadata is still useful to me as sometimes I will adjust those values in screenshots or other graphics documents I produce on my Mac. By default, all screenshots I capture are set to 144 DPI since I'm using a 5K retina display (each point is backed by four pixels). Similarly, when writing software with bitmap-based images, I'll specify different files tagged with relevant DPI values. That way, when I share to others that would have different displays, or ship the software to be used on Macs or devices with different screen types, all works out well.
"please tell me how to set my camera satting 72dpi to 300dpi"
Here's the real scoop on digital cameras. All cameras capture images at full resolution. This is in the form of a Raw file. Simply ones and zeros. The size or quality of the photo is done when you save it. For instance if you select large jpeg your camera deletes image info that it deems less important. Choosing smaller jpeg formats increases the amount of info that gets trashed. If as I assume form you question, you want the highest or best IQ you need to be using large Raw file. This is all the resolution that is available of course it is a much larger file.
Once you have the photo ready for printing in your editing software, like DPP4, you can set the DPI to 300 or wherever you choose. The 72 DPI you see in the exif file info is merely a place holder and is meaningless.
2/07/2023: New product announcements!EOS R8 EOS R50RF-S55-210mm F5-7.1 IS STMRF24-50mm F4.5-6.3 IS STMRF15-30mm F4.5-6.3 IS STM