WOFF and WOFF2 are font formats built specifically for websites. They are compressed so pages download faster, and they are designed to be served over the web rather than installed on a computer.
WOFF
WOFF, the Web Open Font Format, wraps a font in compression so it transfers efficiently to a browser. It has broad support across browsers and remains a safe fallback.
WOFF2
WOFF2 is the successor to WOFF and compresses fonts even further, typically producing smaller files. Smaller files mean text appears sooner, which helps performance and Core Web Vitals. It is supported by every modern browser.
Which to use on a website
Serve WOFF2 as the primary format for the best performance, and optionally offer WOFF as a fallback for older browsers. For installing a font on your own computer, use TTF or OTF instead, since WOFF files are meant for the web.
License terms vary from one font to another. Always review the license included with a specific font before using it, especially for commercial work.