Serious lack of knowledge and failure to understand simple use cases.. please don't mislead the readers by posting irrelevant responses..
Dear Readers,
I suggest please go through the following links for your benefits:
1. Lighthouse official documentation on programmatic execution: https://github.com/GoogleChrome/lighthouse/blob/main/docs/readme.md
2. Playwright with Lighthouse: https://github.com/abhinaba-ghosh/playwright-lighthouse
3. Cypress with Lighthouse :
https://applitools.com/blog/using-cypress-google-lighthouse-performance-testing/
4. Programmatic use of Lighthouse:
https://www.smashingmagazine.com/2020/09/introduction-running-lighthouse-programmatically/