At the end of each level in Sonic Mania, players can earn a seemingly random amount of points for a "Cool Bonus".
I've seen a few theories that the Cool Bonus is awarded for beating a level without getting hit or killing enemies, but nobody seems to know for sure.
What contributes towards a Cool Bonus?
Best Answer
Now that the game has been out for a few weeks, it looks like the general consensus is that the Cool Bonus is based on how many hits you took during an Act.
Users in this thread all suggest that this is the case:
This is also backed up on the Sonic Mania wiki page: