Preventing an ingrown toenail comes down to a habit and, for some people, a procedure. This page separates the two and says which one the sources name for which situation.
The direct answer
Start with the habit. Cleveland Clinic lists steps to prevent an ingrown toenail, and one of them reads: "Soak your nails in warm water before cutting them." The step is small, and it repeats every time the nails are trimmed.
When the habit is not enough
The American Podiatric Medical Association speaks to the case where the problem keeps returning: "If ingrown nails are a chronic problem, your podiatrist can perform a procedure to permanently prevent ingrown nails." The key word is chronic. A nail that comes back again and again is no longer a trimming question, and the procedure is the next option the source names.
What follow-up to plan
Keep a simple tally. Note each time an ingrown nail returns and how long it took to return. That record shows whether a trimming habit is holding, and it gives a podiatrist something concrete when the question of a procedure comes up.
Nail fungus is a separate problem that shares the page group with ingrown nails, and its references are worth keeping nearby. PubMed Central hosts Onychomycosis: Old and New and a paper on clinical laser treatment of toenail onychomycoses. AAFP has an onychomycosis page, and Cleveland Clinic has an overview of toenail fungus causes and treatment.
The trimming habit that has to continue
The two options cost different things. One is a habit repeated for as long as the nail is trimmed. The other is a decision to raise with a podiatrist once the problem proves chronic. Knowing which one you are in is the first step in counting the true cost.