As we move from left to right within a period, the atomic number increases one by one means the position charge on the nucleus increases by one unit at a time, but the electrons are added to the same orbit thereby increasing the pull towards the nucleus which decreases the size of the atom.