Read the error and the attributes
The message names the reason: access denied is a permission, being in use is a lock. The read-only and system attributes block a delete on their own.
$f = 'C:\ProgramData\Vendor\cache.db'
Get-Item $f -Force | Select-Object Name,Attributes,Length,LastWriteTime
Get-ItemProperty $f -ErrorAction SilentlyContinue | Select-Object * -ExcludeProperty PS*
attrib "C:\ProgramData\Vendor\cache.db"