If you want to use your showing function "nuovocontatore", how about modifying your HTML as follows?
<input type="text" id="fname" name="fname"><br><br>
<button onclick="google.script.run.nuovocontatore(document.getElementById('fname').value)">Nuovo contatore</button>
By this modification, when you input text to the input tag and click a button, a new sheet with the inputted text is inserted into the active Spreadsheet.