Drupal 7 has a really handy list of view templates... which is missing in D8/D9.... it doesn't even show up in the template suggestions that show if theme debug is switched on... which is not so handy! So let me see if I can explain how this works. I'm using 'Stable' as a base theme and the initial template files are located: core\themes\stable\templates\views\
Display Output (views-view.html.twig)
Each view starts with the 'Display Output' template views-view.html.twig. This contains the main wrapper div tag as well as the if/else for the header, exposed fields, row, footer, etc.
The naming starts with views-view and ends with .html.twig. The default template is just the start and end together but you can add the machine name of your view in the middle to create a 'Display Output' template specific for your view.
If my view was called 'Case Studies' and had a machine name of 'case_studies', then I could add --case-studies as the middle part to create views-view--case-studies.html.twig.
Just to break that down a little, the middle part starts with two hyphens -- followed by the machine name, but the underscore has been replaced with a hyphen.
Page and Block Templates
Instead of the machine name you could use the type of display you are creating, so if the view creates a 'page' then you can use --page in the middle to create views-view--page.html.twig or views-view--block.html.twig if you're creating a block.
WARNING: as you haven't specified a view in the name ALL views that are 'pages' or 'blocks' will be affected!. This might be handy if you created lots of pages and wanted to add a default header/footer, but you need to be careful not to change ALL of the views on your site by accident.
The solution is to add the machine name part followed by two hyphens --, followed by the display type, for example:
Page: views-view--case-studies--page.html.twig
Block: views-view--case-studies--block.html.twig
So, to conclude....
If using 'Stable' as a base theme, you will find the default 'Display Output' template here: core\themes\stable\templates\views\ and it is called views-view.html.twig. This handles ALL views in your theme.
You can simply save this file to your own theme, alter and flush the cache to override the default 'Display Output' template for ALL views on your site. However, using a certain naming convention you can override a specific view and even specific display types within that view.
Typical template suggestions for a view called 'Case Studies' (machine name 'case_studies') that had both a page AND a block would be:
views-view.html.twig views-view--case-studies.html.twig views-view--page.html.twig views-view--block.html.twig views-view--case-studies--page.html.twig views-view--case-studies--block.html.twig
Style Output (views-view-table.html.twig or views-view-unformatted.html.twig)
There are several 'styles' but I'm only going to focus on 'Table' and 'Unformatted'. When you create a view you have several options under the 'Format' section and this is where 'Table' and 'Unformatted' are located.
This template contains the if/else for the 'title', the h3 tags, plus the foreach loop that outputs each row.
The format runs the same as above so the template suggestions for a view called 'Case Studies' (machine name 'case_studies') that had both a page AND a block, would be as follows. Note: I've included both 'Table' and 'Unformatted' but in reality you'd only be using one of them.
views-view-table.html.twig views-view-table--case-studies.html.twig views-view-table--page.html.twig views-view-table--block.html.twig views-view-table--case-studies--page.html.twig views-view-table--case-studies--block.html.twig views-view-unformatted.html.twig views-view-unformatted--case-studies.html.twig views-view-unformatted--page.html.twig views-view-unformatted--block.html.twig views-view-unformatted--case-studies--page.html.twig views-view-unformatted--case-studies--block.html.twig
Row style Output (views-view-fields.html.twig)
It's worth noting that the 'Table' option doesn't have the 'fields' template (note the 's' on the end) but does have the 'field' template described further down the page. This template controls wrappers, labels separators, etc.
Typical template suggestions for a view called 'Case Studies' (machine name 'case_studies') that had both a page AND a block would be:
views-view-fields.html.twig views-view-fields--case-studies.html.twig views-view-fields--page.html.twig views-view-fields--block.html.twig views-view-fields--case-studies--page.html.twig views-view-fields--case-studies--block.html.twig
Field Content (views-view-field.html.twig)
This is probably the most important template to be aware of as it allows you to specify the view, the display type as well as the field name.
The template itself doesn't contain a lot as the default render code is simply {{ output -}}
Typical template suggestions for a view called 'Case Studies' (machine name 'case_studies') that had both a page AND a block, for a field called 'Title' would be:
views-view-field.html.twig views-view-field--title.html.twig views-view-field--case-studies.html.twig views-view-field--case-studies--title.html.twig views-view-field--page.html.twig views-view-field--page--title.html.twig views-view-field--case-studies--page.html.twig views-view-field--case-studies--page--title.html.twig views-view-field--block.html.twig views-view-field--block--title.html.twig views-view-field--case-studies--block.html.twig views-view-field--case-studies--block--title.html.twig
You can see how this works, you start off with views-view-field and then add the view machine name (if desired), followed by the display type (page/block if desired), followed by the field name.
Note: the field above is 'Title' with a machine name of 'title', but generally the machine name will start with the word 'field' followed by the actual field name. This is all lowercase with underscores replaced with hyphens, i.e.
Field name: Image field-image
Field name: Portfolio Category field-portfolio-category
Field name: Display Order field-display-order
Default View Template Files In Stable
It's worth listing these as they cover the above plus many other areas of a view output.
views-exposed-form.html.twig views-mini-pager.html.twig views-view.html.twig views-view-field.html.twig views-view-fields.html.twig views-view-grid.html.twig views-view-grouping.html.twig views-view-list.html.twig views-view-mapping-test.html.twig views-view-opml.html.twig views-view-row-opml.html.twig views-view-row-rss.html.twig views-view-rss.html.twig views-view-summary.html.twig views-view-summary-unformatted.html.twig views-view-table.html.twig views-view-unformatted.html.twig