The following approach helps me most of the times.

1. Write the melody.
2. Determine the last tone of the melody -- often it is the root of the key of the music. Let's assume "C".
3. Take the first note of the melody. Let's assume "E".
4. The most important basic chords in the key of "C" are C (C, E, G), F (F, A, C), and G (G, B, D). (These three chords contain all notes of the given major scale.)
5. Now the first chord is probably a C-chord.
6. Play the first measure using that chord. Does it sound ok.? If yes leave it that way for a start. If no, try one of the other chords and decide on the least unpleasing sound as ok for a start.
7. Repeat that with each subsequent measure.
8. Play the chord progression only -- listen to it carefully to figure out whether it is flowing or rough, too many changes (hectic) or too few (boring).
9. Get to know some theory about chords: Which tones are the color tones 4, 6, 7, 9.
10. Does it improve if you start a 3. again replacing some of the chords (for example C) by a C6 or C7?
(11. For further improvements you could change the chord mid-measure.)

This work is repetitive and needs ear training. You might start with an already existing simple song. Most children's songs are in that category. Write down the melody, invent the chords, listen and compare to existing examples of the available arrangements of the song.
(I'm sorry but I can only give examples to German songs: Alle meine Entchen; Fuchs, du hast die Gans gestohlen; Kuckuck, kuckuck ruft's aus dem Wald; Summ Summ Summ, Bienchen summ herum. Search for them on the internet, if they are unfamiliar to you they make a good start.)

Good luck.
Guido


Desktop; i7-2600k, 8 GB mem., Win 10 Pro, BIAB 2017; RB 2017 - latest build
Laptop: i5-2410M, 4 GB mem, Win 10 Pro, BIAB 2017; RB 2017 - latest build