JSON:API disable caching locally

To disable caching while testing your JSON:API endpoints you should put this into your settings.php

$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

but for this to work, you need to define this service null, which should be added as

parameters:
  http.response.debug_cacheability_headers: true
services:
  cache.backend.null:
    class: Drupal\Core\Cache\NullBackendFactory

this is usually added as development.services.yml and both of this is added to settings.local.php 

$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/development.services.yml';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

Also don't forget to click SHIFT + refresh in your browser so that browser caching is skipped.