You can follow the below steps to apply for a work visa in Portugal:
Step 1: Get a job contract with a Portuguese company.
Step 2: Your employer will request work authorization from the relevant authorities.
Step 3: Apply for a Type D work visa at the Portuguese consulate.
Step 4: After getting authorization, you can travel to Portugal and register for a residence permit at the local immigration office.
Step 5: You need that residence permit to live and work in Portugal beyond your initial visa.