I'm not sure what exactly do you struggle with but I hope I will be able to give you some pointers here.
In this link you can find arrangement to one of the songs you mentioned in comments: https://musescore.com/user/99729/scores/4141356 This is score, not tab, but the rules for rhythm notation are the same.
Let's look at the first couple of measures:

I marked the beats for you.
- Note that the melody (upper staff) and the accompaniment (lower staff) have different rhythms. We call them separate voices. Sometimes you may have multiple voices written in a single staff, this happens often in classical guitar or fingerstyle repertoire.
- Note how beats in the melody match those in the accompaniment. So note on beat 4 in the melody is exactly above note on beat 4 in accompaniment.
- Note that melody starts with anacrusis or pickup notes, in plain language it starts before beat 1.
- Note that also there is some graphical flexibility, e.g. the first quarter note in the second measure in the bottom staff takes a bit more space than the others, because there is more activity in the melody there.
I would say counting the beats is the most critical thing to work on. Try to play the accompaniment while counting the beats aloud. Then try doing the same for the melody. And also try playing the accompaniment while singing the melody, and analyze which notes come at the same time.