Depth of field is determined by the inverse of the focal length squared, the distance to the subject (the plane of sharp focus) the aperture of the lens and an arbitrarily agreed upon circle-of-confusion or spot on the image that is not in focus but is not so blurry that it does not appear sharp in the final image ie sharp enough to be called sharp.
Another way of looking at depth of field is that it depends directly on the "film" or "sensor" size.
A "full-frame" DSLR sensor is 24 by 36 mm, just like a frame in a 35 mm film SLR, and will have a shallower depth of field than, say, 4.2 by 5.6 mm (IPhone 14) at a given f-number.
The exposure depends on that f number, the exposure time, and the actual speed (ASA/ISO) of the film or sensor.
When I started using an 8 x 10 inch camera to photograph flowers, I immediately noticed the shallow depth of field at a given f-number.
Another? This is the absolutely common way of looking at DoF which has already been posted by the guy above. It can be found on Wikipedia, and that's definite proof that it is misleading, inaccurate and of limited practical utility in ways that they never disclose.

I will show how to derive DoF from first principles.
Let θ be the maximum acceptable angular blur, or the demanded angular resolution or something like that. Let's say it's a small angle in units of radians so I can pretend that tgθ=θ. If U is the object distance then define C
o as the object-referred circle of confusion, i.e. C
o = U·θ.
By simple application of similar triangles, C
o/(½DoF) = D/U, where D is the entrance pupil diameter of the lens. See
here.
Therefore,
2·C
o = D/U·DoF
DoF = 2·C
o·U/D
DoF = 2·U²·θ/DFor more practical convenience, you could replace θ with something derived from angle of view and expected resolution in lines per picture size. I didn't bother, to keep the calculations shorter.
Observe that neither focal length, nor sensor size, nor image-referred circle of confusion make any appearance in this formula. DoF is an object space phenomenon and what happens in the image space is simply not relevant. The only part of the camera which matters is the entrance pupil, and the only limitation is whether you can find a lens with given entrance pupil diameter for whatever image circle and angle of view you may want.
In practice, wide angle lenses for small sensors have short focal length, which puts an upper bound on D by the virtue of practical limitations on how small f/D ratios can be realized. Hence shallow DoF is not achievable on small sensor cameras, but large DoF can be achieved on large sensors because large f/D is not hard. Just stop down.
But if you must introduce the f-number, perhaps because your lens vendor didn't print the pupil diameter on the lens, it's trivial to plug it into the formula in place of D.
DoF = 2·U²·θ·N/f
And now a big lie, because
the widely known formula simply doesn't work macro. But let's pretend that image distance behind the lens is just the focal length f. Then f/U is the magnification and the image-referred circle of confusion C
i becomes C
i = C
o·f/U = θ·f.
Then we get the familiar, difficult to understand, and subtly wrong version from Wikipedia. QED.
DoF = 2·U²·N·C
i/f²