Ask yourself: "is there more than one element which requires the same style, now or at any time in the future?
Yes? -> Use a class
Maybe? -> Use a class
No? -> Use an ID
Thinking of an understandable name for each class or ID is hard.
Choosing a good name can save you (and your team) time in the future, reading and maintaining code.
There are many methodologies that different teams use to standardise how they name classes and IDs in CSS. For example: BEM, which is outlined below
But for now, here are a few very simple pointers:
Some methods, such as BEM use specific text delimiters.
BEM stands for Block, Element, Modifier.
In the class name, the first word represents the block the element belongs to, the second word represents the element itself, and the third (if needed) is a word to describe what has or could change, the modifier.
See the image below for an example: card__button--success{
Click here to learn more about the BEM naming methodology: