If the shed is new and not included in the original building permit, they would probably need a building permit and you should have received a corresponding building notification from the municipality.... a few centimeters of distance are irrelevant; boundary construction must be permitted and the maximum meters allowed for it must not be exceeded. I would clarify this in your position; then talk to the neighbor, if it is not approved, then you can probably operate freely on the boundary and he is not allowed to complain..
Hmm we don’t need a building permit here overall, only a building notification. I generally never received anything from the municipality about neighboring properties, but we were also the last ones to build here. The house next door always had about 4-5 weeks more building progress than us.
That is then an enclosure by fence if you go to the boundary. That is regulated by neighborhood law in the federal states or the development plan. Behind the boundary you are then free to build as you want.
I actually don’t want to go right up to the boundary, but what counts as "on the boundary"? The neighbor also didn’t put his shed "on the boundary", but if he opens the door of that part further than a right angle then the door is on our property. ;) So, it’s probably not 40 cm distance. Maybe about 20? No idea, I wasn’t outside with a ruler. If I now, say, set up a wooden privacy fence at the same 20 cm distance from the boundary, am I then legally safe? A colleague said you have to keep 50 cm, others say that only applies to hedges.
A look at the building regulations of the respective federal state and the development plan can answer this question.
The development plan doesn’t say much about it. Only that properties facing a larger street may not build something like that if it impairs traffic visibility. That does not apply to us. Then the next "higher" regulation must apply for that, right? Where do I have to look then? Building Code? Building Regulations? There are also special regulations just for gardens, right? Everything is a matter for the states again? I don’t quite understand this bureaucracy jungle.