CORS error on loading fonts

I am trying to use locally served fonts but I keep getting this error. What did I do wrong?

The fonts are stored in a folder called fonts which is on the same level as the css folder.

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  src: local("IBM Plex Sans"), local("IBMPlexSans"), url("../fonts/IBMPlexSans-Regular.woff2") format("woff2"), url("../fonts/IBMPlexSans-Regular.woff") format("woff");