The reason it works is that almost nobody does it. A project ends, the invoice is settled, and both parties move on. A short message a few days later, mentioning something particular about the work, arrives in an empty space and is disproportionately noticed for the effort involved.
Make it specific enough that it could not have been sent to anybody else. Naming the thing that was difficult, the decision they made that improved the outcome, or the result you were pleased with demonstrates that you were paying attention. A generic thanks for your business reads as automated and produces nothing.
Send it a few days after completion rather than immediately, which is a small adjustment with a real effect. A message arriving alongside the final invoice reads as part of the transaction. One arriving after everything is settled reads as a person rather than a process.
Use it to ask for a review, since this is the moment with the highest response rate you will get. The work is finished, the result is visible, and they are already thinking positively. Include a direct link so the request is one tap rather than a task, and ask for a review rather than for feedback, which produces a private reply instead.
Ask about referrals in the same message or shortly after, phrased as a specific question rather than a general one. Who do you know facing the same situation produces a name where do you know anybody does not. Both requests fit comfortably in a short message provided the thanks comes first and is genuine.
Consider what happens next as well as what happened, since the end of a project is also the point where the relationship either continues or lapses. Mentioning that you are available if something comes up, and meaning it, keeps a door open that otherwise closes quietly.
Write it yourself rather than automating it, at least at the volumes a first year business handles. An automated thank you is recognisable and it removes the entire benefit, which is that somebody took a minute to write something particular. If the volume ever makes that impossible, a template with a genuinely personal sentence added is the compromise.
Keep a note of what you said, since the same client may return and referencing the previous work accurately is what makes that relationship feel continuous rather than transactional.
Then treat it as the last step of the work rather than as marketing, which is what keeps it sincere. A message written because a process required it reads differently from one written because the project genuinely went well, and the difference is visible to the person reading it.
Consider sending something physical for larger engagements, since a card or a small item arrives in a space almost nothing competes for now. That is disproportionately memorable relative to the cost and it is worth reserving for the relationships that warrant it.
Keep the follow up separate from the thank you if you are asking for something, or at least put the thanks first and mean it. A message that is transparently a request wearing a thank you reads as such, and it costs the goodwill the message was meant to build.
Set a reminder rather than relying on remembering, since the project ends and attention moves immediately to whatever is next. A note in your task list at the point of completion is what makes this happen consistently.