Save it to ~/.config/fontconfig/fonts.conf. Then install all the font packages mentioned in the comments. Finally, run fc-cache and/or reboot your system to apply the changes.
Note that this isn’t a magical fix, you may still need to tweak the hinting/aliasing/subpixel rendering etc based on your monitor, resolution, DPI, and personal preference. Check out this page for more details on how to tweak this + some troubleshooting tips: wiki.archlinux.org/title/font_configuration