Hello @nkrsaini
You need to regain access through the console port. Connect a console cable from your computer to the switch's console port. Enter privileged EXEC mode then enter global configuration mode. Create a new local user with administrative privileges using username admin privilege 15 secret <password>, replacing <password> with a secure password. Reconfigure HTTP authentication with ip http authentication local, ensure VTY lines accept SSH and telnet with login local and transport input ssh telnet.
This should restore your ability to connect to the switch via the web UI, SSH, and telnet.
--
enable
configure terminal
username admin privilege 15 secret <password>
ip http authentication local
line vty 0 4
login local
transport input ssh telnet
Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.