A rejection does not always mean the end of the process. In many cases you may have the right to appeal or request a review.
The first step is to review the rejection letter attentively and assess whether an appeal or a fresh application is the stronger option.
Appeals are time sensitive and should contain a comprehensive argument as to challenge the rejection of your application. You will have two chances to appeal and, if you still receive a negative decision, you may need to consider litigation in the High Court.