Its like, I come up a with a new riff, and I'm working on it, but while doing so I come up with something new, or some new idea pops up in my head. Anyway I write both of them down or tab them on guitar pro, and decide to work on them later. A while later, a new idea pops up or a new riff comes up. I just can't seem to remain focused. What do UG ?
Come up with a riff and do not finish working on it until you have a song done. I have the same problem. I recently found a folder on my computer chock full of songs I started writing two years ago, complete with simple recordings. Some weren't half bad. Not sure what that has to do with anything but... yeah. Basically just do not stop until you have something presentable
This happens to me alot. I like just having quite a few riffs on hand and then i'll sit down and try and piece them into one whole song. You don't have to this is what I tend to do
Riffs are pointless unless they make a song. So stock up as many riffs you can come up with, give yourself a rest, get back to them and arrange. What riffs seem to belong together? Which could be an awesome intro? Which could sound great with some vocals on it? Then work out how to glue them together.
Two bands I'm obsessed about : Coheed and Cambria.
You don't need to write down you riffs in my opinion. I come up with a lot of ggod riffs that I want to work on later but I write down very few of them. If a riff is really good I remember it, if not I may forget it.

My point is: You don't need to be scared to forget your riffs (I have experienced it at myself). Try this and later you try to use some of your riffs in a song and continue with the riffs. Maybe add some more riffs. You KNOW what I mean

So try to not start with new riffs and others all the time but try to focus!

learn the technique of musical development.

the greatest symphonies of mozart and haydn are based off of only two or three themes (for each separate movement, of course, but still, single movements can sometimes reach 7 minuets or more) -- the length of which might equate to a guitar riff of moderate length.

learn to extract music from the riffs or themes you write.
Anfangen ist leicht, Beharren eine Kunst.