How to use createRecord in LWC?
Let's look at how to use createRecord in LWC. We will be reaching out to this only when the LDS tags doesn’t serve the purpose.
You might come across a common requirement which is attempting to create a record using an LDS method.

It's not suggested to use this approach straight away, try to use one of the LDS tags to create a record. If the requirement needs a bit of customization only then rely on using this method which is createRecord
.
Here is the sample code that we can use to create a record using the LDS method (which is createRecord()).
exploreCreateRecord.js
This is the template file used to capture the user input so that it can be used in creating a record.
exploreCreateRecord.html
Hope this helps!
I have put together a FREE course on Javascript that helps you master Lightning Web Components.
It just takes 2 hours to finish the course and you will be able to feel the difference.