lockscreen not available Ubuntu 20.04.2

You check result with this command once

gsettings get org.gnome.desktop.lockdown disable-lock-screen

if result is true, then make it false like

gsettings set org.gnome.desktop.lockdown disable-lock-screen false

Source.