How does the octet rule affect periodic trends?
It is a "rule of thumb" in which it describes the ideal configuration for an atom to achieve stability. This property differs for each element and as a result, in numerous trends to describe the pattern.
The octet rule is a "rule of thumb" in which an atom must achieve a full electron shell in its outermost orbit. This results in 8 electrons.
When an atom achieves this ideality, it becomes stable/unreactive. Upon this stability, it can no longer react with other elements.
Atoms achieve this configuration by reacting with other atoms. Either through an ionic bond - electrons transfer from the cation to the anion, and a covalent bond - the sharing of electrons between two non-metals (most of the time).
Elements on the Periodic Table are presented by itself in which no reaction is occurring. Scientists can predict certain results due to each element's reactivity.
For example, the Noble Gases are stable. Under normal circumstances, they will not react with other elements. On the other hand, Halogens and Alkali elements are extremely reactive as they need 1 more electron/lose 1 more electron (respectively).
Certain patters arise from this trend. They include, electronegativity - the likelihood for an atom to attract an electron, and ionization energy - the amount of energy needed to remove an electron from an atom, resulting in a cation.
Hope this helps :)