How do I allow modules to provide their own view?
Views are config, so:


Create a View
Export the config for it as a single item using the UI or drush (removing the uuid if applicable).
Include it in your module’s ./config/install folder
Install the module on a different site; the View will be created automatically