If your goal is to make an image with shallow depth of field, where the subject appears sharp while the foreground and the background appear blurry, then you should use very wide apertures like f/1.8 or f/2.8 (for example, if you are using a 50mm f/1.8 lens, you should set your lens aperture to f/1.8).
When should you adjust aperture?
When you increase the aperture value the aperture opening inside the lens gets smaller, reducing the amount of light that can enter the camera. Similarly, when you decrease the aperture value the opening gets bigger, allowing more more light to enter the camera.
Is it better to have higher or lower aperture?
A higher aperture (e.g., f/16) means less light is entering the camera. This setting is better for when you want everything in your shot to be in focus — like when you're shooting a group shot or a landscape. A lower aperture means more light is entering the camera, which is better for low-light scenarios.