There seems to be confusion on depth of focus concerning aperture. Here is a diagram I made real quick that shows how it works.
The thing to remember is when an object’s in focus, the light originating from that point will converge at the camera sensor at the exact same point and place! If the convergence does not happen at the exact same point and place then that means the light is more spread out across the sensor, this renders a subject out of focus.
Key thing to remember: The larger the opening in the lens(aperture), the larger the spread across the sensor, which will result in a shallower depth of focus.