This is an important question. If you want to write a good story, there are a few things you need to keep in mind.
First, you need a story worthwhile telling. This is the most important point. You could be the best writer in the world, but if you do not have a story to tell, then your work will not be a good one. In fact, no one would want to read it.
Second, assuming that you have a great story to tell, you need to work on your writing. This only comes with practice. So, I suggest you continue to write as much as you can. Also work on the use of words, sentences, and other nuances of language.
Finally, read the works of others to see what works. The more you read the works of others, the better your writing will become as well. Do not be afraid to imiate. In time, you will develop your own voice, as a writer.