There’s no right way to create a melody and no objective way to measure it, i.e if it is good or not. Everyone is different – there’s no one solution. However, here are my thoughts.
Avoid logic, avoid theory, avoid conscious application, avoid trying to write ‘interesting or good’ melodies.
Strive instead to write only from your subconscious mind; your subconscious mind knows no theory, creates no pastiche, tells no lies. No melody is wrong when it’s a natural expression of who you are and what you feel. What you feel is bound up in what you are writing (the music or the lyrics or a combination of both).
Find exercise that help you to get your conscious mind out of the way.
Stop trying to write ‘interesting melodies’ – there’s no such thing. There are only melodies that elicit an emotional response in the listener – because they sprang from emotion. Just tell the truth, your truth.