Pixels are the source detail
A digital photo has a fixed pixel width and height until it is resampled. Those pixels are the source detail available to distribute across a print.
Embedded DPI is often only a preference
JPEG and PNG files can contain density metadata. Applications may use it to choose a default physical size, but changing the number from 72 to 300 does not create additional pixels.
Effective PPI comes from the intended print
Divide the number of pixels along an axis by the number of printed inches along that axis. A 3000-pixel-wide image printed at 10 inches is 300 PPI regardless of whether its metadata tag originally said 72 DPI.
Use PPI targets as planning ranges
Around 300 PPI is a strong close-view photo target, 240 PPI is still strong for many photographic prints, and lower values can be acceptable at greater viewing distances. Subject sharpness, paper, printer, and viewing conditions still matter.