If a dowel fits their hole snugly, the way they should, then glue that’s placed on the dowels will end up being scraped outwards along the dowels when they’re inserted. Because of this, you should apply glue in the dowel holes only.