Because an event in JavaScript is triggered only:

the first part comes from the index.html

When the page is loaded, the message appears in the console automatically.
this is the part of the app.js

        
 
const ButtonLoadProject = document.getElementById ('loadProject'); ButtonLoadProject.addEventListener ('click', Load1Project ()); function Load1Project () {     console.log ('Upload project2'); }