I get this question quite often mostly from friends and well-meaning folks.
Maybe we can ask a different question — not “how do you get clients” but how do clients get you?
To keep it simple, this is my process:
Meet or search for clients that have a need to fulfil using software. I’ve met new software clients from my local Chambers of Commerce. Craigslist is another marketplace I’ve signed up clients. They tell you about their requirements for their startup or business. You, as a software developer, come up with a design and technology solutions to meet their needs.
Add value to the client before money changes hands. The idea here is to give first to receive. This takes initiative on your part and thinking ahead. In the software world, the way to do this is by developing a Minimum Viable Product (MVP) or really small prototype for the potential client. Note this does not solve all the problems but it demonstrates to the client that you’ve taken the time to understand the problem they are trying to solve.
Client sees the value you are offering, client signs-up. Hopefully, after you’ve found the client, added value upfront, the client can decide to open their wallet.
This process has worked out well for me. Hope it works for you too.