Is the buy button directly from the theme or did you use an application in order to add the buy button? If not, then the main issue is coming directly within the theme. There might be a theme code error in the back-end that caused this issue. You might want to reach out to Shopify support team so their technical team will be able to further investigate what caused this error. Kindly inform them that there are no code changes made or recent app installation prior to this error. You can reach out to them by going through their Shopify Help Center and enter your concern on AI chat box, respond to it until the “I still need help” or “chat with a support advisor” option appear.