If you forgot your Samsung A50 password and want to factory reset it, there are a few different ways that you can do so.
One way is to use the “Find My Mobile” feature on Samsung’s website. This will allow you to remotely factory reset your phone by entering in your Samsung account information.
Another way is to use the Android Device Manager. This is a Google service that can be used to remotely factory reset your phone if you have forgotten your screen lock password.
Finally, you can always try performing a hard reset on your phone by pressing and holding the power button and volume down button for 10 seconds. This will erase all of your data and settings, but it should allow you to bypass the lock screen password.