The perception of objects as solid despite atoms being mostly empty space is due to the way our senses and brain interpret the interactions between atoms and electromagnetic forces.
Although atoms consist of a tiny, dense nucleus surrounded by an electron cloud, the size of the nucleus is incredibly small compared to the overall size of the atom. The majority of the atom's volume is composed of this electron cloud, which contains negatively charged electrons moving around the nucleus.
When we observe or interact with objects, what we perceive as solid is the result of the electromagnetic interactions between the electrons in the outermost energy levels of atoms. These interactions create repulsive forces that prevent atoms from passing through each other. It's similar to how magnets repel each other when you try to bring the like poles together.
So, even though atoms are mostly empty space, the electromagnetic forces between the electrons in the outer energy levels of neighboring atoms give rise to the sensation of solidity. When you touch an object, for example, the electrons in your hand and the object repel each other due to these forces, providing a sense of resistance and solidity.
Our perception of solid objects is essentially a result of the collective behavior of countless atoms and the electromagnetic forces that prevent them from easily passing through one another.