At my job, we don't really care that much about Git commit history. We are a small team. I generally make a few small commits a day, and what matter is my push at the end of the day to save my work in case something crappy happens, like my laptop battery sets on fire and I lose all my work in a computer campfire.
So, why would I be talking about squash? Pumpkins are squashes. Surely, I am not talking about Halloween. Every time I use Git and am ready to do a pull request, what I do is merge my changes into one branch and "squash" helps me to eliminate the 100s of commits I had made before. What I do is create a new branch from master/main and then merge from my working branch with while I am in the new branch using "git merge --squash workingBranch".
This is simple enough. Then, I delete the old branch and do my pull request on the GitHub site. There is an interactive squash merge that I will not go in detail here, and you can see it in documentation. That allows you to cherry pick which commits to get rid of using the commit hash. It is pretty neat! Git command line is such a powerful tool and Linus Torvalds has thought of basically everything!