There is of course ... no 'one' way to 'do it'.
You can become familiar to 'what is available' to the melody, and what is 'not available' for the melody. And then of course you can break that rule to great effect ... but I press on.
Sing the notes of the chord as you play the progression. Become familiar with the notes, the tones, that make up the chord. Often, you can get a very 'agreeable' melody for your lyircs this way.
Just sing with oooo, ahhhhs, uhhhhs, whatever is appropriate and expedient.
After you are really familiar with what 'is available' the melody will probably just pop right into your head and then it's all over

.
Becoming familiar with what seems to be 'not available for the melody', those tones that are 'dissonanat' to the currently voiced chord, is great for building color in a melody.
When a chord is sounding and the melody is singing a note that belongs to the chord, we are in agreement. But we can choose a note to sing in the melody which is not in the chord and we can say that note 'passes through' the chord, it become a 'passing tone' and there are a handful of clearly defined passing tones.
A note that sounds with the chord and is a note in the chord, (the note E within the CEG chord), that then changes to a note that is not in the chord BEFORE the chord finishes sounding becomes dissonant and passes through the chord, for example the no F while the CEG chord is playing, that note can even be prolonged to make it a suspension, and it can pass through the chord.
So how do you know when it's appropriate to sing a note IN the chord, or sing a note that is DISSONANT to the chord. Your ear will know, or your 'heart' will know. But your Earbrain needs to be familiar with the 'pitch collection' and what pitches belong to the chord sounding, and which do not.
So, sing the notes of the chord from the root to the fifth, or ninth or whatever and sing them triadically. If the chord sounding is a C chord, sing CEG repeatedly while the chord is sounding.
Do this for several breath cycles or measures, next sing DFA while the CEG chord is sounding ... and the next day, your brain will have created a matrix for that song with affinity values for the notes, and those affinity values for those notes will attach to the words, over time, to create a melody for you.
It's all very organic, and there are methods like this to create melodies, but after a while you build a huge matrix of affinities for your voice type, your style in prose as well as progression, and all the other variables and you begin to create melodies spontaneously.