Well there are quite a number of varieties, and maybe someone here is good enough to pick them out from simply seeing a picture. If we wanted to be fully scientific about it I suppose you could post a pic of the screw next to a mm rule and we could compare pitch. I can tell you the one on the left is usually used to secure IO brackets and blanks for PCIe slots/cards. The finer pitch one on the right does look like a motherboard mounting screw. I believe the one on the left would also be used for the PSU. I'm really not great at remembering which screw goes where though
But if you want to know what I do, not saying it's best practice but its been fine for me, is to try to thread it in by hand. If it works easily then you know its the correct diameter and pitch. If not then don't force it. You still need to make sure the length is appropriate for your application. When I first installed my current build into the case, I initially used the incorrect motherboard screws, but this was apparent because they bottomed out before the motherboard was completely secure.
General rule with any PC building, is don't force anything. Ever. It's all designed to go together easily and in only one way (odd exception - 4 pin RGB headers, why these aren't keyed is beyond me). Also screws don't need to be torqued down. Snug is fine. Same goes for spring mounted coolers, snug is fine. Really the main reason you're using a screwdriver is because it's small and awkward, not because you need the mechanical advantage.