Writing is hard. Typing words is easy, but writing is hard. I know there are a lot of people who think that “if you publish it, they will read it” but they are so massively wrong. No one is owed a reader and even if your quality and story is good, it doesn’t guarantee that you will find an audience.
If you want to be a writer or author you have to be in it for the long haul. Yea there are stories of overnight success but they are usually just that stories. Even J.K. Rowling saw herself as a failure and spent years struggling before becoming famous and even had 12 publishing houses reject the first Harry Potter book.
So if you are discouraged, remember you need to take the time to hone your craft, to build your story skills, and learn as much as you can. Practice and then practice some more. Publish your first book even, but then continue on. If you love writing then you are blessed to be able to do what you love. If you are writing for any other reason, then you are doing yourself wrong.
Take one baby step, then the next and the next until you are down the road.
Have a great day!