Most of the songs I write start with a chord progression as well. I may have a beginning melody in my head but then I will determine a chord progression before fine tuning the melody. Then I choose melody notes that harmonize well with my chord progression.
If you stick with chords that fit within the key you are writing in, then all the notes of the chords will be in the key of the song and will be found in the diatonic scale based on that key. So if you are writing in the key of C major, and stick with the basic common C major based chords, the notes you choose for the melody will all be one of the notes in the C major scale.
But certain notes will usually harmonize better with certain chords. Although there can be exceptions to this depending on where you are going with the melody and what you are trying to convey.
For a detailed discussion of the easiest way to find the notes that harmonize best with certain chords when writing your melody based on a chord progression -read this on Stack Exchange: Easy way to choose notes that go with chordsEasy way to choose notes that go with chords
You will also find several answers to the question linked below (on Stack Exchange) that will help with your understanding of how chords and scales fit together:
How to make a song with chords and scalesHow to make a song with chords and scales
Also - the following question on Stack Exchange explores situations where composers choose chords (and possibly notes) from outside the key as part of a chord progression:
Will a song written in a key only use chords from that key?Will a song written in a key only use chords from that key?
As you can see, your question comes up often in one form or another.
Have fun with your composing and writing.