If the form has required and optional fields, it is better to remove optional and make all fields required. Then you can remove asterisks (*) and other required indicators from the form. This always makes the form easier and cleaner. And most importantly, it makes it unambiguous — the user just has to fill out the entire form.
Users always and by default understand that all fields in the forms are required. So unnecessary indication of this makes no sense. It's exactly the opposite, you need to indicate optional inputs.
It may be impossible to remove optional fields in long and complex forms. For example, if these fields make sense to the part of audience. In this case, a good solution is to separate required from optional.
The form should have required fields first, and then the optional separated by a border or background. This visual separation will simplify the form and make it more predictable: it will clarify what the user needs to fill in and what is filled out depending on their case.
Ideally, it is worth explaining in the block of optional fields why these inputs are needed and in what case users should enter data.
An optional field must be reasonable and make sense. What does it mean if we see the optional field 'Company' in the registration form? Why should it be specified? Usually, there is no answer to this question and no reason to fill in such a field either.
You can get additional data later. Now it is important that the user becomes your client promptly.
If you still want to get more data or a certain field for some users will make sense in the future work with the website or service, please explain why you want to get this data and what you will do with it.
Sometimes, all fields are required in forms, although some have no value in the future use of the website. It's really hard to explain why developers and designers do that. Perhaps it is an inconsistency of requirements or just a mistake.
The typical result of such solutions is a low conversion of forms and frequent refusals of users at the step of filling form in.
People don't like forms with something they don't want to fill in and understand why. When I see that somebody want my phone number, but I don't know why or know it won't be important, I always enter 1234567.