They say that Neon $Ne$ is stable because it has 10 electrons and with 10 electrons it completes its octet and completing an octet decreases the potential energy of an atom to the minimum and a system loves to remain in the lowest energy as possible.
Then I read that an electron is literally a probability wave and we can only talk about the probability of an electron present at a point at a certain time instant.
How are the two terms related? How do waves decide that when a system is going to be stable? How is potential energy related to these waves?