It starts with a small one you said yes to without thinking. A client asks you to 'just quickly' do one extra thing. You do it. Then it happens again. Then it's expected. Then you're doing 30% more work for the same rate.
The fix isn't a long contract clause. It's one sentence: ' Happy to take that on — want me to add it to next month's scope or swap it with something current?'
That single response protects your time while training the client.