In the meantime, try the following:
Run the Bluetooth Troubleshooter
Select the Start Menu > Settings > System > Troubleshoot > Additional troubleshooters, and then from the list select Bluetooth > Run the troubleshooter.
Reinstall Bluetooth driver:
Press the Windows key + X and select Device Manager.
Expand the Bluetooth section
Right-click on your Bluetooth adapter, then click Uninstall Device.
Ensure the "Delete driver software for this device" is checked
Restart your computer.
Test the Bluetooth if working or not.
If the issue persists, what is the exact make and model of your computer?
To isolate the issue, try connecting the Bluetooth device to a different computer. Does it connect successfully?
What specific Bluetooth device are you using? Is it a headset?