There are a lot of factors that go into the insurance costs for homes, but adding an attached garage can usually increase your insurance. The reason for this is because an attached garage gets calculated into the overall square footage of your home and if the space insured increases, so will the insurance but not by much. This can sometimes be the case for detached garages as well.
While a detached garage may be calculated into the square footage of your home, there is a chance the garage would fall into the 'external structure' section of your insurance policy. This would then require you to get more coverage however, this is not always the case.