Go to a traditional hardware store. Might be an Ace Hardware or may be totally independent. If you truly don't have any place like that, then you may do OK at a Home Depot or Lowes or similar, but the little places tend to have a much larger selection of (literally) nuts and bolts. Bring the pictures/dimensions. They will either help you find it in the hundreds of drawers of hardware or they will disappear for a couple of minutes and come back with the parts in hand.
Note that in most cases the head type does not matter with the exception that if the head is designed to be flush then it may have to be flush for another part to fit over it. But hex (allen), phillips, Torx, etc. generally doesn't matter. Length, thickness (diameter), type of threads matter.