No, you can't delete a cloud storage object that is in the locked, retention-enabled bucket.
You can only delete such an object after it has fulfilled its retention period.
If you have not locked the bucket, you can temporarily remove the retention policy, remove the object, and then reinstate the retention policy.
Hope it works!!
To become a Google certified professional cloud architect, join GCP Training today.