I've always thought that this advice was common sense, or at least more prevalent than it maybe is. But if you want a really easy piece of advice to follow, don't lie and pretend you know something you don't.
My team's senior dev was sick last week, and I was the unlucky one to shadow a manager in her place for a round of technical interviews. The amount of candidates who outright lie about knowing something is kinda crazy. I witnessed some candidates just outright lying and getting answers so wrong it's embarrassing.
If you're in an interview, and you are asked a question you do not know the answer to, admit you don't know. I was basically told not to judge any candidate for something they do not know, and if possible to lead them to the answer to see what they at least know about a subject we were asking about. For the people who outright lied and pretended to know, the manager just moved on and essentially marked them off as someone willing to lie about minimal things like an interview question.
One very big piece of advice to go along with this though is if you are going to guess, admit that you guessing. I watched multiple candidates not know the answer to a question and admit that they were guessing and some got close, while some did not. But, the manager was able to turn this into an exercise of leading them to the answer by giving more information. Testing what they did know rather than what they didn't.
At the end of the week, pretty much anyone who lied In the interview was dropped from the process. A good amount of people who admitted they didn't know the answers to one or two critical questions were moved along to the next stage.
Overall, just don't lie when the stakes are really low. Save the lying for when you actually get the job.