I would think that knowing the local laws of where you sail would be very important as well.
Yes, even when you have to seek out the police and/or customs to report that you have landed. Otherwise, you could just stay for weeks unnoticed. Yes. It’s a very different world traveling by sailboat. No TSA corrals.