Caching of blocks for anonymous user
You don't have to worry about the values which are set for cache max-age in other places, because when these are merged the lower time that you have set wins.

But you can't control with max-age the page cache for anonymous users. You have to use \Drupal::service('page_cache_kill_switch')-&gt;trigger(); in the block build method to disable the page cache or you can simply uninstall the module Internal Page Cache if you plan to use the block on all pages.


  but I don't have max age in admin/config/development/performance


You should set this to the same max-age to control the browser cache and proxies.