I would say, when you flatter your neighbor you are puffing him up. You’re (potentially) building his ego and pride. This becomes a net that willl trap him later because he will believe he is better than he is, and this is the quickest way to fall into sin.
In this case, “flattery” means exaggerated, undeserved, insincere praise. It’s saying more good and positive about the person than we should - especially in order to manipulate the person, to get them to praise us in return, for example.
It’s not when we have a good, modest, truthful comment about someone. That is good and important praise we can offer. But flattery, in the Proverbs sense, is a sin of manipulating someone’s emotions and trying to get them to believe you think they’re much better than they are.
So then also, we’re “spreading a net” when we do this. But the person who gets the flattery can avoid the net by not believing the empty praise and staying humble. Usually this means by stopping the person from flattering them.