If you are serious about your writing, you’ve probably searched for the magic formula that will guarantee publication of your work. I hate to be the one to break this to you, but there is no magic formula.
Writing is hard. Writing well is hard work. Writing well enough to see your work published takes time, dedication, ruthless editing, and yes, a bit of luck.