There are many articles that suggest that certain vitamins or herbs will prevent cancer or dementia. This is not one of them. The thing with vitamins is that we only need some amount, nothing more or less. I have low vitamin D levels, so i take a supplement for that, but only because my doctor says so. Taking more vitamin C for example won’t hurt you though. It’s not smart to do so, but at least you know that you are probably safe.
Now, if you do have a deficiency, even a small one for certain “vital” vitamins you may have issues. Sometimes multivitamin supplements for such vitamins are recommended to balance your intake in relation to your requirements. You don’t always eat perfect meals, so it’s fine if you supplement nutrients.
Vitamin B3 though, is directly involved in some pathways associated with cancer pathology. It helps your cells repair damaged DNA. So, if you go out in the sun and UV radiation causes a few mutations in some skin cells, Vitamin B3 (along with many more molecules) will fix the mutation. There have been some really good studies (linked below) that show this effect. So, if in your next blood test you see low B3 levels, ask your doctor about it so you can get the right dosage.
The way vitamin B3 works to prevent mutations is by being a precursor of NAD+. This helps intracellular redox reactions and is involved in many pathways that result in DNA repair. This includes pathways of p53 and HIF-1a.
Sources: Nicotinic acid: A case for a vitamin that moonlights for cancer? , Correlation of changes in HIF-1α and p53 expressions with vitamin B3 deficiency in skin cancer patients. , The role of vitamin B3 in reducing non-melanoma skin cancer .