JSFiddle - React, Tailwind, and code Playground
HTML
<div id="target" style="font-family: 'Baskerville';">hamburgefonstiv</div>
JavaScript
let fontFace = new FontFace("Libre Baskerville", "url(https://fonts.gstatic.com/s/librebaskerville/v4/pR0sBQVcY0JZc_ciXjFsK8j0T1k_tV7QYhgnOhA2764.woff2) format('woff2'), url(https://fonts.gstatic.com/s/librebaskerville/v4/pR0sBQVcY0JZc_ciXjFsK5gtRqbDAavNCEBluaoIIJc.woff) format('woff')");
fontFace.load().then(function(loadedFontFace) {
document.fonts.add(loadedFontFace);
document.getElementById("target").style.fontFamily = "Libre Baskerville";
});