We have a website that uses jquery in its code, and because of this, jquery is not used much, which causes unused js to cause problems in Google search console, and Google page speed insight. This is not a CMS website and is written by bootstrap and jQuery. The problem of decreasing website performance is due to the presence of unused js in JQuery. you can see this problem on https://i.stack.imgur.com/19ISI.png
I have another JavaScript file that is causing this problem, and for some reason I don't use CDN and I upload the files to my own host. I also use another library and I have this problem with it as well.
How do I solve this problem?