If you are an employee of the company and you complete the invention to complete the tasks assigned by the company, the right to apply for a patent belongs to the company, so you are the inventor.
If you are not an employee of the company and are cooperating with the company in an individual capacity, it is recommended that when you cooperate with the company, you add an "intellectual property ownership" clause in the contract to clarify and Who owns all the intellectual property rights developed? It can belong to you directly, or it can belong to you and the company jointly.