Only a few coutries allow non citizens to flag a boat in theitr countries. If you are not German then when you buy the boat ist will autoamtically be unflgged in Germany
. You'll need the boat title released so you can register it some place else. Your home country would be typical. It's generally done as a way to avoid taxes
but it carries extra costs and you can still get caught in a bind by staying some place too long. In the end the boat winds up some place and at that point the issue of taxes
and citizenship come into play. Where the boat sits is as important as well as how long it's been there and where it is flagged and if EU taxes have been paid may be an issue as well.
Unless the boat is larger and more expensive the advantages of a foreign flagged vessel dimishes to costing more than paying the tax.