I'm having the same issue in Pages; I am currently operating on macOS Ventura 13.6.1. In the custom templates section in Pages I have a total of seven templates saved. In my case I am trying to open a custom template for an APA-style paper; however, when I click on this template it opens another custom template.
Although I cannot quite diagnose how or why this came to be an issue, I have found the location in Finder for custom templates.
The file directory for Pages is as follows:
/Users/$USER/Library/Containers/Pages/Data/Library/Application Support/User Templates
And for Numbers it is similar:
/Users/$USER/Library/Containers/Numbers/Data/Library/Application Support/User Templates
The "$USER" tag is just a placeholder; this will be the name of whatever user you are currently signed in as. Also, in order to navigate to the Library folder under a user you must do the following: while in Finder, navigate to Go in the upper left, then hold down the option key, and select Library when it appears.
After I found my custom templates folder I opened it. And behold I have found the culprit: my APA custom template does not exist in this folder. In fact, the only custom templates that I can open properly are the ones that are listed in this folder. As I said, I am not sure how or why this issue presented itself--but it does seem like my custom APA template has disappeared somehow. I am only noticing this issue after updating to Ventura; perhaps this is a bug with the new operating system and/or a bug with the software updater.
I have looked around in other various folders but I cannot find my missing template. As far as I can tell the fix is to simply recreate missing/glitched templates, which is a bit annoying. Nevertheless, I hope this can be of assistance!