This page shows one way to do responsive sizing of text based on viewport size. The meta tag in the HTML document head gets the viewport size from the browser, and sets the initial and maximum scales. The stylesheet does a media query to set the body font size based on the max viewport width. Font size is calculated based on the viewport width (vw).
Try loading the page on a laptop or desktop computer, then scanning the QR code to load it on a mobile device.
For more information on this, see the following MDN pages: