What can I do to prevent my fingernails from twisting as they grow?

Vitamins may help. It is difficult to know what you mean by twist as they grow. There could be a problem at matrix where the nail is formed or even at the underling bone. Neither of those problems are treatable at home. If however the nails are soft nutritional supplements containing biotin may be helpful. There is also a prescription for strengthening nails call genedur.
Fingernail Dysplasia. Curling fingernails may indicate hypo- or hyper- thyroid, an iron deficiency, maybe also a B12 deficiency. Or it may be nothing at all to worry about, (do you have any other symptoms of any kind?). See your dermatologist for help.