Since LWC is based on SPA. There is a good possibility that we would have to work with modal popup in LWC.

When we want to provide the option of creating a new record or when we want to update an existing record, we will not have the liberty to redirect the user to a new page, since everything is based on Single Page Architecture in LWC.

The solution in that case is, usage of modals.

modal pop-up in lwc

Let me give you a use case before we get hands-on. Let  us say we want to have a custom implementation of updating a record.

In that case, I would like to have a custom button and I will tie-up the custom functionality to it by making use of modal popup in LWC.

This is how it can be implemented.  

Here comes the template file ExploreModalsLWC.html.

And this is going to be the js file ExploreModalsLWC.js.

In case your object has RecordTypes activated even that can be implemented in the template file. You can do some research on record-type-id on lightning-record-edit-form tag.