Ionization energy is the energy required to remove an electron from the outermost energy level of an atom. The ionization energy generally increases across a period (row) in the periodic table from left to right, and decreases down a group (column). This is because the effective nuclear charge, which is the net positive charge experienced by the outermost electron, increases across a period and decreases down a group. The more protons in the nucleus, the stronger the attractive force between the nucleus and the electrons, and the more energy is required to remove an electron.
Fluorine is on the rightmost side of the second period in the periodic table, while chlorine is on the right side of the third period. Therefore, fluorine has a higher effective nuclear charge and higher ionization energy compared to chlorine.