One helpful starting point, though you may need to gather some further information to fully comprehend and apply:
Within a given key, all notes of the scale can be harmonized by one of three chords while giving a functional harmony. These 3 chords would be the I, IV and V chords of the scale.
We can use C Major as an example:
C Major Scale: C, D, E, F, G, A, B
- I = C Major: C, E, G
- IV = F Major: F, A, C
- V = G Major: G, B, D
Each note of the scale is in at least one of the chords. This means that whatever melody you play, assuming it fits into a diatonic scale, can be harmonized by at least one of these chords. You will have to make choices when there are common tones between chords but this will significantly decrease the amount of experimenting necessary to decide which of your options is best suited.
Not all notes should be harmonized as a chord tone though. A lot of times you will have a melodic phrase with a handful of notes that will be harmonized with a single chord. You then have to choose which of the chords will properly harmonize the entire phrase, not just the individual notes.
This approach works but you might find the outcome boring. All of the chords will work and properly support your melody in a traditional way but there is very little textural change, which leads to a very narrow artistic/emotional expression. A next step could be to look into relative relationships, which can point out the similarities between two different chords. Though the two chords are different and have different textures, they can serve the same function. This will allow you to incorporate minor chords, which is a huge textural change from exclusively using major chords.
Eventually the melodies you are trying to harmonize may have notes beyond the diatonic scale. That would make the 3 chord approach less than effective. However, if you learn and practice the 3 chord approach, then you will have a good understanding of harmonizing and will likely find it much easier to pick a chord.