When we speak about perspective, we also need to talk about color and contrast.

When an object is closer to the viewer it has more contrast, being close we can clearly see the shadows, halftones, lights and brightness of the object as it moves away from us these characteristics get smother, and if these objects are totally distant will not have shadows, lights or intense brightness, this is clearly perceived in a landscape painting, but when we paint a still life with elements not so far from each other, in this case the same rule applies, obviously the difference is less, but it exists, and it is necessary to apply it in order to create the sensation of closeness and remoteness (perspective).
The same happens with color, it loses intensity when it is more distant, it becomes milky and loses strength, then mastering the contrast and color we can create the visual perspective that occurs in nature and that is exactly the realistic effect we want to reproduce in our Paintings.
Do not forget also that for our brain the objects located closer to the lower edge of the canvas are closer to us and as they are located higher they are moving away, so our brain catalogs the perspective in everything we perceive, being aware of these three factors we can achieve the three-dimensional effect we want in oil painting, but it is not all we need, this is just a glimpse, there are more ways to create prespective but for now this article could be helpful to start understanding how we can create the illusion of perspective.
This is fulfilled in the attached image, in the cups we perceive the proximity of one of them and the remoteness of the other two, the one closest to  us, is closer to the lower edge of the canvas, and thus as they are slightly higher are more back in location, the color feels intense in the nearest cup and the contrast is notoriously stronger on the other hand watch what happened with the other cups closer to the background, they are darker, have less contrast and the color is off.