In most cases when a Computer/PC/Laptop has issues connecting to a Bluetooth device (Portable speaker, Headphones, Active speakers), it's caused by your Computer/PC/Laptop's Bluetooth driver (software).
The driver (software) should support the following Bluetooth protocols, to be able to play music/sounds from your Computer/PC/Laptop:
A2DP (Advanced Audio Distribution Profile) driver for your Computer/PC/Headphones to transfer music.
AVRCP (Audio/Video Remote Control Profile) driver to send skip/forward/pause/play music to your device
Always get the latest driver version available for your Computer/PC/Laptop.
To download the correct driver (software), visit the manufacturer's website of your Computer/PC/Laptop. They usually have a "Support/Download" section where you can find the correct driver. Otherwise, contact their support.
The standard drivers provided by Microsoft/Windows systems are often not correct, and will result in error messages (such as having to enter a PIN code), or pairing not working.