Method 1: the style files need to put in the public folder
const newEle= document.createElement('link');
newEle.type = 'text/css';
newEle.href = './style.css';
newEle.rel ='stylesheet';
const header = document.querySelector('head');
header.appendChild(newEle);