In today’s publishing world, a trilogy is the answer. No question about it.
There are so many books being published now that a single book will not likely be noticed, let alone make a decent number of sales. So the publishing industry has taken to asking writers to write a trilogy before publishing even a single book.
Then the publisher — or the writer if the books are being self-published — can published all the books in the trilogy in quick succession. One every few months or, in today’s heated and very competition-oriented market, one every month.
That way, the reader will see the next book by the author before they have forgotten their name and, if they liked the first, they will buy the second and then the third. By then the hope is that the reader will remember the writer enough that when future books are written, they will recognize the name and continue buying that writer’s books.
So, yes, unless you are already a world-famous author, you’d be wise to write a trilogy. Or an entire series.