These steps can be used to remove and replace a waste drain:

Cut off the water supply: Cut off the water supply to the sink or fixture before starting any plumbing repair. The main water supply valve or the shut-off valve under the sink can typically be turned off to do this.
The nut holding the drain tailpiece to the P-trap can be removed by using a wrench. Pull the tailpiece out after removing the nut. Remove the old drain by loosening the locknut holding it to the sink or fixture.
sanitise the area: Remove any dirt, filth, or old putty from the area where the old drain had stood.
Putting in the new drain: Putty the new drain's flange's underside with plumber's putty. Push the drain firmly down into the drain hole after inserting it. Install the rubber washer and locknut from underneath the sink or fixture, then hand-tighten it.
Install the P-trap and tailpiece: Use a fresh slip nut and washer to secure the tailpiece to the P-trap after inserting it into the drain. Utilizing pliers, tighten the nut.
Leak detection: Turn on the water supply and look for any leaks near the connectors and drains. Until the connections are solid, tighten them if there are any leaks.
concluding the installation Reattach the sink or fixture to the wall and connect the water supply when the new drain is installed and there are no leaks.
In order to avoid any water damage, it is crucial to make sure the new drain is firmly in place and that there are no leaks. It is best to seek the advice of a qualified plumber if you have any questions about any step of the installation procedure to make sure it is completed correctly and safely.