The orbital diagrams for fluorine and neon are shown.
The electrons always fill the lowest energy levels available until that level is filled, then electrons fill the next energy level until it is filled.
An atom is least stable and therefore most reactive when its valence shell is not full.