How much you tip in a restaurant is loosely based on the amount of your tab. The accepted minimum is 15%. There are cheap folks who like to preach the literal translation of the word “gratuity” in order to escape even that, but what they don’t realize (or are ignoring) is the fact that tipped servers’ minimum wages are lower than everyone else’s, & that regardless of what you tip them, the IRS is going to ASSUME that they made a certain amount of “gratuity” based on their sales & they will be taxed on it. So that server is counting on that tip. But yeah, there is no law forcing you not to be a cheapskate.
It gets more complicated & less complicated when it comes to bar tips, though.