Penatonic scales! Otherwise known as the CAGED system... 
Learn all of those and find a song in a key you like and you will see that they all link together... It helps you at soloing and doing rythymic solo stuff.... And as for writing your own stuff just pick up a guitar and play what sounds good. Even just force it, i mean who knows if you force it something good might be made up. And with lyrics try writing almost stories than deep meaningful stuff. Or just shout jibberish 😁