Pixels are the picture.
DPI is only a note about paper.
An image's resolution is its pixel count: 4032 × 3024 is all the detail it will ever have. The "72 dpi" or "300 dpi" stored beside it changes nothing on screen. It only tells a printer how big to make it. Change it below on a real JPEG and see which bytes move.
What matters for print is pixels per inch of paper: the pixel count divided by the print size. 300 is the photo-lab standard at arm's length; posters seen from a metre away look fine at 150.
A 40 × 40 pixel icon enlarged by your browser: copying pixels gives blocks, smoothing gives blur. The vector version is redrawn from its shapes at every size, so it stays sharp. That is the real difference between raster (JPG, PNG) and vector (SVG, PDF text).
Browsers lay pages out in CSS pixels, defined as 1/96 inch at arm's length, then map each one to however many real pixels the display has. That ratio is what makes phones sharp. The bar on the right is a nominal CSS inch; hold a ruler to it and it won't be one.
4K refers to a horizontal resolution of approximately 4000 pixels. The standard 4K resolution is 3840x2160 pixels (UHD).
Higher resolution means more detail but requires more storage and processing power. Choose resolution based on where content will be displayed.
For most uses, 1080p is excellent. Use 4K if you plan to crop, stabilize, or future-proof your footage.
Yes, directly. Doubling resolution quadruples the number of pixels and roughly quadruples the file size.
DPI (dots per inch) measures resolution for printed images. 72 DPI is screen resolution. 300 DPI is standard for print quality.