sudo apt remove bcmwl-kernel-source && sudo apt install git dkms
git clone -b extended https://github.com/lwfinger/rtlwifi_new.git
sudo dkms add ./rtlwifi_new
sudo dkms install rtlwifi-new/0.6
tried these commands but at end i got some steps for rebooting but i don't know how to do MOk or something it says
and then i rebooted but didn't know what to do so just started Ubuntu normally. my WiFi still does not work
The secure boot will block unauthorized kernel modules to load. To install the proprietary driver, you need to turn off the secure boot during the installation. This is what your screenshot is talking about. Regarding how to walk through the whole process, please follow the steps in this Ubuntu wiki https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS (in your case, the term DKMS mentioned in the wiki page is equivalent to your wifi driver.)
In the meantime, you may need the command
ubuntu-drivers
to help you to select the driver you need automatically and install it for you, e.g.sudo ubuntu-drivers autoinstall
.