Like i was wondering if theres was any kind of way of making sense on how melody lines move or their rhythm. for examples are there rules when it comes to notes being held across bars.
there are no rules in art. art is how you feel.
the rules of music theory are something we come up with =after= having made a bunch of songs. you don't need to follow those rules. often, you should try to =not= follow those rules.
but, since melodies often come from lyrics... and lyrics are spoken words... the rhythm often comes from how the sentence is spoken. So that the lyrics have punch.
but, in the end, don't look for rules to make a song. make the song how you feel it should be made. whatever makes it sound good - that is how you should do it.
There are no "rules", but you do have to understand the effect that is created by different techniques. A note held across the barline, for example, creates a syncopation. There's nothing wrong with that, but you need to know it will happen. You need to know the effect of jumping to another note rather than stepping to it, the effect of a static melody vs. a dynamic one, the effect of having an "outlier" note that is melodically quite far from the general range, the effect rests have on the feel of the line, the effect of sequencing, etc.
Again, there are no "rules", but all these things and more affect the sound and style of a melody and how well it will communicate the mood of your piece.