For the M5s and such is a flat head the most preferred? Thanks!
Usually, pan head is what you want. You can also use socket-cap screws. Flat head screws won’t work because they are expecting a beveled edge to fit into. Take a look at this page on McMaster - they do a great job of showing the different styles:
I used socket cap allen screws for almost everything, and it worked great.