You must perform a hard reset, put it into recovery mode, and restore it to use it again.
In the past, you could bypass the lock screen using TWRP recovery, which was installed (flashed) via fastboot or download mode for Samsung models. Using the file manager directly removed the system module for the lock screen.
But now that device encryption is mandatory when entering a password, it's practically impossible without attempting brute-forcing. Even if you did, it would likely take centuries or millennia to guess the password.
Furthermore, based on forum rules, I absolutely cannot provide you with a guide on how to hack electronic devices, even if they're yours. Brute-forcing is a true hacking method; an attacker could gather information from the forum and use it for malicious purposes.
I also want to point out that now with new devices, if you have a Google account connected and the device is formatted, you must at least remember the password and email address of the Google account connected to it. I don't know if this was implemented in 2021 (since I see the model is from 2021). Upon closer inspection, it was introduced in 2015 and is called FRP (Factory Reset Protection). However, it depends on the manufacturer whether they implement this feature. Hopefully, it hasn't been implemented yet, or at least you can remember your Google account password. Otherwise, you'll be forced to unlock the bootloader and open the device to bypass this screen. Again, if you don't remember your Google account password, I can't provide a guide on how to bypass this screen. This very useful system was introduced to:
- Zero resale value on the black market: If a stolen phone can't get past the initial setup screen without the owner's password, it becomes a useless "paperweight." An object that can't be turned on and used has almost no market value, except for replacement parts.
- Discourage theft at the source (Deterrent): If thieves know in advance that modern phones will remain locked after a hard reset, the incentive to snatch or steal a smartphone dramatically decreases.
- Protect the ecosystem and compete with Apple: Apple introduced a similar feature (iCloud Activation Lock) in 2013 with iOS 7, a move that significantly reduced iPhone thefts in large cities. Google absolutely had to adapt to ensure the same level of security and peace of mind for the billions of users who purchase Android devices.
Even though bypasses exist, they force thieves to do too much work to try to resell a stolen device, but many give in because the value of a potential thief's work is greater than what they would get from stealing something else.
To recap:
If you don't remember your password, you'll need to perform a hard reset, and if it has an FRP system, remember your Google account.
If you don't remember your Google account password, I can't help you here.
I don't advocate bypassing these security systems in any way.