Proximity refers to how close elements are to one another. Therefore, it occurs when elements are placed next to each other. The position of the elements helps us to portray a relationship between the separate parts. The opposite is also true. By putting space between different design elements, you can add separation when their other characteristics are the same. If there is no proximity, there is a perception of a lack of relationship between the elements.
In UX design, proximity is used to get users to group certain things without using any boxes or whatsoever.