Buongiorno scusatemi siccome sto impazzendo mi potete dire in questo codice dove sbaglio l'html è perfetto appena premo il bottone in invia il codice javascript non viene eseguito, i campi di input nel codice html li posso mettere all'interno di un form anche se non si devono inviare a nessuno devo fare solo dei calcoli in javascript semplicissimi.
<!doctype html>
<html lang="it">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<title>Contabilità</title>
  </head>
  <body style="background-image: url(matrix-3109378_1920.jpg);">
    <div class="container mt-5 pt-2 text-white" style="background-color: green;">
        
                <h1 class="display-4">Contabilità Familiare Mensile</h1>
            
           <div class="container "></div>
          
           
              <h3 class="ml-1">Bollette</h3> <input type="text" id="bollette" placeholder="Importo mensile bollette" required><br>
                 
                 <h3 class="ml-1">Benzina</h3>  <input type="text" id="benzina" placeholder="Importo mensile benzina" required><br>
                  
                 <h3 class="ml-1">Spesa Alimentare</h3> <input type="text" id="spesa" placeholder="Importo mensile spesa alimentare" required><br>
                 
                 <h3 class="ml-1">Farmacia</h3> <input type="text" id="farmacia" placeholder="Importo mensile farmaci" required><br>
                 <h3 class="ml-1">Spese Extra</h3> <input type="text" id="altreSpese" placeholder="Importo mensile spese extra" required><br>
                 <h3 class="ml-1">Stipendio Mensile</h3> <input type="text" id="stipendio" placeholder="Inserire  importo stipendio mensile" required><br>
                 
                 <input type="button"  onclick="contab()" value="Invia" >
                 <p id="area"></p>
                <input type="reset"  value="Cancella">
                 
             
              
              
            </div>
        </div>
    </div>
    <script>
      function contab(){
      var x=document.getElementById("bollette").value;
      var y=document.getElementById("benzina").value;
      var z=document.getElementById("spesa").value; 
      var f=document.getElementById("farmacia").value;
      var s=document.getElementById("altreSpese").value;
      var t=document.getElementById("stipendio").value;
      var ris=x+y+z+f+s-t;
      if (ris<0)
      document.getElementById("area").value=" grazie"+ris;
    
      else 
      document.getElementById("area").value= "hello"+ris;
    
  }
     
   
    </script>
   
   
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
     </body>