How to setup Arduino to 8mhz properly?

install the MiniCore Boards.
burn a bootloader with internal 8Mhz