When building a vinyl sided lean-to shed against a vinyl sided garage wall, how do you attach the shed roof to the wall so no water goes between the garage and shed and what do you do about the gaps along the attached walls?
The way to overcome this problem is to treat the lean-to as you would an extension to your house/garage.
Vinyl siding companies produce a wide range of profiles for overcoming most situations. Standard profiles to ensure the area between lean-to stay dry and mould free are the internal corner post and the roof flashing piece.
Both of these components should be available to be compatible with your existing vinyl siding system. You would cut and remove the siding from the area that you are going to build the new lean-to. The gaps between the new and existing siding would then be closed using the profiles mentioned above.