I’d recommend an instructor- they will explain basics to you and it is very important to get these learnt very well. PLaying the electric is sure easier as the fretboard is thinner and you don’t have to stretch fingers so much. If you want to compose a lot, learn chords.After about 2 years you could probably start writing simple songs, but it is really about how much effort you put in: and how much you are devoted to playing. I have a friend who’s been having an instructor for 3 months and he is good, he composes music. I’ve been learning for 8 years of my life (i’m 17 now) and i compose, improvise to other music and play Satriani and Mark Knopfler lots. I’ve taught myself electric guitar.