I resolved this error by setting the Deployment Info to the correct version of iOS (15.0) for the Widget Extension - it was previously set to 16.0 which the widget and app don't support.
Took a while to figure it out. There might be multiple causes for this error and one expects a better description from XCode to help developers identify the issue.