Many journals are highly selective and a rejection is not always indicative of the quality of the work. If your paper is declined publication in one journal, then you have the option to resubmit it elsewhere for consideration. You should ask for feedback, revisit your manuscript and edit so that your submission is stronger the second time around.
Beyond academic journals, there are many other avenues to publish your work. Below are several ways: