Couple of Options
- Windows Key+E to open File Explorer > Right click on CD drive > Eject
- Push the drive inside which should make it unlock and come out.
- Below HP help also covers additional method
https://support.hp.com/us-en/document/c03302363
Disclaimer - This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.