As a basic rule:
Contents usually refers to specific, individual things contained in something. And often anything that is in a container (such as a can or a bottle) is referred to as contents.
Content usually refers to a more general concept. In other words, all of the things contained in something are seen as one whole thing.
It sometimes doesn’t matter whether you say content or contents. Sometimes it’s just a matter of what the usual collocation is — and that has to be learned on a case-by-case basis. (Similar to the way you learn vocabulary.)
Books often have a “table of contents”. This is a listing of all the specific, individual chapters contained in the book.
For example, your grammar book probably has a table of contents which lists the specific chapters/units and the specific grammar points covered in each.
But you might say the content of your grammar book is grammar (a more general concept).