Sweet potato doesn't contain B12 - you're probably thinking of Vitamin A.
Dairy doesn't contain enough B12 to supplement you on it's own, which is why the study recommends against and instead suggests taking an actual B12 supplement (Puritan's Pride lozenges)
4 weeks shouldn't be enough time to develop a serious B12 deficiency but doing this for longer could impair you cognitively.
fwiw, I wouldn't personally be a massive advocate of supplements - dietary sources are usually better if possible - so not sure whether the study's supplement recommendation here is a good one. Just quoting the instructions given to participants
Dairy doesn't contain enough B12 to supplement you on it's own, which is why the study recommends against and instead suggests taking an actual B12 supplement (Puritan's Pride lozenges)
4 weeks shouldn't be enough time to develop a serious B12 deficiency but doing this for longer could impair you cognitively.