I don't know if there is one "best" method. I think most modelers sort of develop over time a system that works the best for them. The method you choose may also vary with each structure you build depending on how complicated the kit is or how intricate you want the paint job to be.
That said, I have one method that I try to follow most of the time. If the walls are going to be the same color, then I prefer to assemble the building first. That allows me to play around a bit making sure the corners have a tight fit and maybe even filling a few gaps. You also don't have to worry about ruining your paint job with a glue smear. I then spray the model after it has been assembled, washed and dried.
However, if the building is a storefront type building where the whole front wall is going to be painted a different color, then I'll only assemble the side and rear walls before painting them. Then I'll paint the front wall a different color before gluing it to the rest of the building.
If I am going to brush paint anything like windows, doors and trim, I try to be especially careful in handling the building once the initial color has already been applied. You can always touch up a small spot if you make a mistake painting the trim color, but it's a real pain if you mess up a large area by rough handling or by laying it on a dirty surface while you brush paint the trim.
Just my thoughts.
Jim