Once you get into ketosis, you’ll have to maintain it for a period of time to gain any benefits. One way to maintain ketosis is to be aware that there are some things that might kick you out of ketosis. These include:
Too many carbs from sugar, sugary drinks, sweeteners and grains, but also fruit and starchy vegetables (carrot, sweet potatoes, etc.).
Not enough physical activity and too many extra carbs.
Artificial sweeteners  (some people can handle these, others can’t).
Too much protein.