This answer depends on several things.
- Your user expectation
- Your user availability
- What information you really need to ask the user
- Where, when and why does your user use your app?
- How much they trust your application
- What is your user's desire to fill in the form
No matter how many fields you have, you should make life easier for your user. See some actions:
- Use the right type of field. For example: type = number, type = passwors …
- Automatically fill fields with the most common data
- Make sure the Tab or Next key on the keyboard works, and focus on the appropriate next field
- Automatically fill in the fields based on the previous information. For example, use the zip code to automatically fill in the address.
You can see some UX best practices for forms on this video:
And you can see 5 case studies of forms on this article: https://www.ventureharbour.com/how-form-length-impacts-conversion-rates/
And you can see a trusted website talking about it: https://neilpatel.com/blog/the-definitive-guide-to-lead-generation-form-optimization/
Maybe I can help more if you tell me more about your user, the course, the reasons why he has to fill out the form and about your application.