When you create a vSphere Content Library using vCenter Server, the content library is comprised of both the raw uploaded files (OVF, OVA, VM Templates, ISO, etc) which are stored in a vSphere Datastore and the metadata that is generated by vCenter Server for the individual files, which are stored in the vCenter Server Database (VCDB). In contrast, when an External vSphere Content Library is created, which can be backed by any HTTP(s) endpoint, both the metadata along with the raw files are stored external to the vCenter Server and is managed separately.
Today, there is not an easy way to relocate or move an existing vSphere Content Library from one vSphere Datastore to another. The process would require creating a new vSphere Content Library, then manually using either the vSphere UI or API to then copy all the files from the previous content library to the newly created one which is backed by a different vSphere Datastore.
Typically, the reason for this use case is either you are running out of storage and can not expand further or you need to decomission the underlying storage backing the content library.
Recently, I needed to look into this for my own homelab setup where I plan to rebuild one of my setup which is running on vSAN and I wanted to preserve existing content library without having to transfer content back/fourth. The context above was important as I was able to figure out this could be done with some minor tweaks to the VCDB (which I typically do not recommend touching for this reason) but for this purpose, it really is the only way which I had also confirmed with Engineering.
Disclaimer: This is not officially supported by VMware, use at your own risk.