Atmega 328p at 3.3v : Internal vs external oscillator
If the 8 MHz oscillator is off by a handful of percentage points, it will affect timing measurements you make using millis() and micros(). It could affect the baud-rates of Serial or SoftwareSerial. If these are not of any concern, the only remaining difference would be how fast your code can be executed. It's unlikely that the code pushes the chip runs so close to its maximum capability that it would matter, even at ~8 MHz.
Update:

... I just want to know if clock frequency effects the code and if I need
to change code a bit like for example blink sketch runs at different
time intervals on 8mhz and 16mhz(I tested it).

If you do nothing else, then yes, millis() will appear to run at half speed. You need to add a board definition to the IDE for an Arduino Uno running at 8 MHz. Then millis() and micros will be adjusted for the slower processor clock. How you do this depends on whether you choose the internal and less accurate 8 Mhz oscillator, or an external 16 MHz crystal.
For the internal oscillator, there is a board-definition on Github with instructions to load it into your IDE.
For an external oscillator, this article describes how to select the board type as &quot;Arduino Pro or Pro Mini&quot; and then be able to select the board frequency, using the Tools menu twice.