Your local planning or zoning office can identify your zone or land use category. For each category, there are set limits and controls regarding building placement on property, size, height and structure coverage percentage of lot area. There are minimum dimensions from property lines, rights-of-way, easements, and structures and they are called “setbacks”. There will be setbacks from front property lines or street center lines, side, and rear property lines. Some common setbacks are 20′ front, 5′ side, and 10′ rear. Larger property sizes will require greater setback dimensions than smaller.
Garages have often been built right at the property line or two lines at the corner. This is called “zero setback”. In older, urban residential lots these were common because lot sizes were relatively small. If you are replacing a zero setback garage the local authority usually allows exact location replacement. If your garage design has zero roof overhang on the zero setback side then you could build your foundation and framed wall right at the property line and there would be no elements projecting into the adjacent property.
One hour fire-resistive construction is usually required for any structure within 1 ft. of the property line. That means that, in the preceding example, the wall framing, sheathing siding trim, roof structure, and roofing must be built with approved one hour fire resistive materials. Doing it that way is possible but those materials are rather expensive. This is why many garages are built exactly 1 ft. away from the property with no overhang on that side. Also, placing the building 1 ft. + roof overhang dimension eliminates the elevated cost by not requiring the special construction.
In my experience, the best zero setback solution is to build the face of the wall a couple of inches in from the property lines. Face the wall with cementitious fiber sidings such as HardiPlank or HardiPanel and use the same for a trim board at the top as flush fascia, as there would be no actual roof overhang on that side. The roof would ideally be flat or shed form sloping to drain inward on your property.
Your local building dept. will have guidelines for building with zero setback.
Additionally, when building within that area between the standard setback and the zero setback there may be height limits more restrictive than if building within the standard setbacks. Your local authority for zoning will have that information as well.