When did the issue start? Does this happen with all Bluetooth devices or only one (TWS/speaker)? Do you see any error message when it disconnects?
Have you tried removing and pairing it again? Go to Settings > Bluetooth & devices, remove the device and pair it again.
Also, please disable power saving: Right-click Start > Device Manager > Bluetooth, right-click your Bluetooth adapter > Properties > Power Management > Uncheck Allow the computer to turn off this device to save power.