Boogers are basically just dried up mucus or snot inside your nose.
So to prevent boogers from forming inside your nose you should blow your nose out often on a tissue and use a saline solution to clean your nostrils out of the mucus.
If there is no mucus inside your nose then no boogers will be able to form inside your nose.
Nasal sprays and mists inside your nose can also help prevent boogers inside your nose as well.