If you are on our hosting, or you use the official docker install then gzip and brotli are both enabled out of the box.
You can run your site through https://www.webpagetest.org/ to confirm, or just have a snoop in chrome / safari or firefox dev tools.