How to select and change colors/ material of a part in a mesh?

How do I change the color/material of the rounded edges of those cubes while the cubes have like another material/ color? Do I have to select the edges and form them into a new object?

Multiple materials

Cheers I’ll check them out!

Do you know a quicker way to select all the edges? haha