How to make cables for 0.1 in. pitch pins?
Yes, that's an entirely common way to connect two boards.

However, realize that the MTA-100 connectors are rated for 5 A per contact. If you don't need that much current, you can find a more compact solution. Or you could maybe not so much space but use something like an 8-position IDC ribbon cable connector to give you a quicker (lower cost) cable assembly process.