The Checkout gives you the option to show/hide the Company field on your checkout page.
Here are the steps you need to follow to add company field in shipping and billing address.
Step 1: Make the company required in the WooCommerce settings
Go to Theme Appearance > Customize.

Then select WooCommerce.

Next, select Checkout.

Here you can find an option to make the Company field Optional/Required/Hidden. Make sure to choose the option "Required" and save the changes.

Step 2: Go to the 'Design' tab
Scroll down to the Checkout Form Fields and click on the “Shipping Address” field.

Step 3: Locate the Company field
Choose to show/hide the company field by clicking on the eye icon placed beside it.

Once done, click on the 'Update' button.
This will save the changes.
Here's how the company field will appear on the checkout page:

That's it! This is how you can add the company field in the shipping or billing address.