A TTF installs on a computer, but a web page should serve a WOFF2: Brotli compression makes it around a quarter to a third smaller than a WOFF, and every current browser supports it. A smaller font file means text appears sooner. Check the font's licence first, because many fonts forbid web embedding.
The outlines and tables of the font are copied unchanged and only the wrapper around them changes, so the letterforms, hinting and layout features are exactly the same. WOFF2 is handled by a WebAssembly module that downloads the first time you compress to WOFF2 and is cached; WOFF2 reorganises the outline tables, so converting back gives the same glyphs but not an identical file. A file that is not a TrueType, OpenType, WOFF, WOFF2 or collection font is refused.