In Dragon Quest Builders 2 the different coloured hearts that are dropped by villagers on the islands are Gratitude points and collecting enough of them will enable you to ring the bell at the centre of the town you are in to level that town. When you level up a town you will unlock new blueprints and recipes for you to build and craft. This How to Collect Hearts Quickly will tell you how you can get them fast.
One of your main objectives at the base of each of the islands is to collect the hearts dropped by villagers as appreciation for completing their quests. At some point most of the villagers will have a red exclamation mark above their head, this indicates that they have a quest for you. These quests can range from buying a specific item to building a particular room. Once you complete these tasks a heart will drop each time a character uses the item you brought, or the room you built until you eventually have enough to level up the base.
To quickly pick up all the dropped hearts which can take a long time to collect if you are away from the base or they are spread out in different rooms is to simply hit the bell on the island with your weapon. When you do this all the dropped hearts will automatically be collected. Take advantage of this to explore the island withought having to constantly worry about about collecting the hearts that have been dropped while you were away.
Check out our Room and Set Recipe Guide to find out what items are needed to build the different rooms.
We have questions and answers related to this topic which may also help you: