I was having a similar issue recently. It was suggested I look up scales and chords in those scales. FLStudio has a way to highlight scales in the piano roll and the ability to insert chords. Look through the docs to see how to do this.
I found this nice plugin called Scaler that does most of the work for you. I’ve been using it and I like it a lot. https://www.pluginboutique.com/product/3-Studio-Tools/72-Utility/3933-Scaler
Once I know the scale and the chords I just experiment with different chord progressions until I get something I like. I hope this helps.
Give free plugins a try before you spend tons of money. Take a look at my list of free plugins. Helm is both intuitive and powerful if you want to get more into sound design, and you can make good sounds fast so it shouldn't slow down your workflow too much.
It also helps if you save all the sounds you make as presets, and occasionally just sit down and do sound design instead of making a beat. You'll gradually start to build up a library of your own presets, so if you want to use a sound you've made before you don't have to make it again.
The thing about plugins is that they don't magically make you better, they just offer you different features that you can use to improve your workflow or your music. An IDM producer who's seriously into sound design might not get much out of Nexus, and a beatmaker who's only ever used presets wouldn't get much benefit from Harmor.
I wouldn't recommend spending hundreds on a plugin until you know exactly what you want.
What musical key is your composition in? If you don't know then, I think this is where the problem is. If you came up with the chord and melody separately, then it might be that you have two different tonal centers, and when you match them up there is too much dissonance (or clashing tones) for your style. If you can identify what key your chord sequence is in, then you might be able to just get away with transposing the melody into that key. If you are not sure, and your chords are fairly random. Then in order for your melody to fit in harmonically, remove clashing notes, and replace them with tones that are in your underlying chord sequence. If you really want to keep some of those clashing notes, turn them into short passing notes, that lead into strong chord tones.
If the above sounds like a complete mystery, then you may need a basic primer on chords and scales. Check out this app Piano Chord Trainer.