Going to court first or going to a lawyer first is not immutable and cannot be generalized. according to the normal procedure, of course, you should consult a lawyer first, and then a lawyer will represent you in the lawsuit, so that you can avoid detours in the lawsuit and have a high probability of winning the case.
However, it is necessary to pay the lawyer's fee for entrusting a lawyer. If economic conditions do not allow, it is also allowed to directly sue without looking for a lawyer or to have a lawyer appointed by the court participate in the lawsuit if necessary.