As you can tell, there is no single best way, because a lot depends on the farm setup and the mare and foal temperaments.
My opinion, fwiw: gradual weaning, 6+ months.
By gradual, I mean start separating for meals - adjacent stalls if possible, or 1 in the stall the other right outside in a small paddock, maybe foal the in the stall and mare right outside, even tied if possible so she can’t wander off too far, or someone hold her while she eats. Or vice versa. The details will vary based on how neurotic either of them are at being separated by a wall. This could start once the foal has his own little meal. But even long before then you can work on leading manners by leading the foal 1 step away from the mare, then back, and over the weeks, increasing the distance and time away as he gets more confident.
I increased the time they were in their separate stalls for meals until it was in the 1-2 hour range. At some point they spent a few nights in, separate stalls. He was totally cool with that, though of course raced to nurse first thing when they were let out LOL
At 8 months I fenceline weaned. I hadn’t planned on waiting quite that long, but at 7 months the weather was uncooperative, wet and cold, so I waited. I don’t regret it in the least. As Marla said, some bit of “weaning” was already happening. He was nursing way less, eating “grownup” food, drinking water, etc. She was more and more intolerance of rude foal behavior, and had more say in when she allowed him to nurse.
He had already been in with everyone else, which was 2 geldings in addition to his dam. This is an important piece of this puzzle - very familiar and comfortable with the horse(s) he will be with once mom is no longer with him. If the mare/foal are living with a group, then the foal would stay with the group and she’d come out. In my case, I put him with 1 of the geldings, and the mare with the other, and I rotated which gelding was with the foal every week or so.
How long it will be before they can be back together is just something you’ll have to see. I’ve seen foals go back with their mom after 30 days and barely speak, and 90 days with the 2 of them very happy to have a nursing arrangement again LOL I’ve heard of them never being able to be back together again, though I think that’s pretty uncommon.
I put mine back after 5 months. Weaned at Thanksgiving, back together mid-April. He did try to nurse once, Mom said “wait, really?” but begrudgingly let him. After a few seconds she kicked him off her. A bit later he tried again and she said NOPE, and that was that.
Definitely have the foal eating on his own for at least several weeks before weaning. Change as few things at a time as possible.
Given he was a he, he was gelded before going back with his dam, so that’s something to consider at that point.