That little red “clamshell” is a coin holder / coin dispenser—often called a spring-loaded coin purse.
You’d squeeze the sides and it would pop open (like a mouth) so you could grab coins quickly. These were especially common before cards and apps took over, when people carried a lot more loose change for payphones, vending machines, parking meters, etc.
Definitely a small relic from a more cash-heavy era.