The error message "The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold" occurs when the number of lookup columns in a SharePoint list exceeds the threshold limit. This limit is 12 for SharePoint Online and SharePoint Server 2019. Since you have counted the lookup columns in your document library and found that there are 12, it is likely that this is the cause of the error.
To resolve this issue, you can either remove some of the lookup columns or change the way you are querying the data to use fewer lookup columns. Another option is to use indexed columns and filtering to keep the view size for the list to 5,000 items or less. For more information about how to create a filtered view that has a column index, go to Manage large lists and libraries in SharePoint.
It is possible that the recent update to the SharePoint Online site URL could have caused this issue, but it is more likely that the issue is related to the number of lookup columns in the document library.
References: