There are two issues with dairy: lactose intolerance and milk protein sensitivity.
All babies produce the enzyme lactase, or they’d never be able to cope with lactose, but most people lose the ability to produce lactase at some point after weaning. Two populations, however, developed mutations that allow them to continue to produce lactase all their lives: the Maasai, and Northern Europeans. If you have ancestors from either of those populations you are not likely to have to worry about lactose-intolerance.
An allergy or sensitivity to milk proteins, especially casein, can develop at any time, and it brings its own set of problems, unrelated to lactose.
In either case, people affected by these conditions usually find it best to avoid dairy. It fairly often happens that people discover that they have a problem with dairy only after they’ve been keto for a bit—up till then, the problem was drowned out by the noise of all the other diet-related problems they’d been having.