Hey there, this is a question relating to writing, but i'll give you a bit of background

At the beginning of the summer 2/3 months ago I was in a pretty poor place with my guitar playing, not physically with it but just interest wise and I was advised by my tutor to think about why I got into this originally. Well over the summer i've spoken to lots of people who've been musicians for years etc and continuously write material for their own interest. I came away realising that I got into this to have fun and make interesting music; yet with my tutor i'm currently trapsing through old jazz standards for the piano which I believe to be the source of my recent disinterest in the instrument; don't get me wrong, I enjoy jazz music and jazz guitar if it's done interestingly but this sort of topic i'm covering isn't buzzing me.
Now for years i've not been acting on making interesting music for myself, but rather fallen into the rut of just learning songs rather than writing

[Short version] Was getting disparingly bored of guitar for not sticking to why I started with it

Anyways; never having done anything like this before (truthfully) I'm just wondering what is an advocated method for starting it. With a lick or riff? By choosing a key then building it around that? Just general messing around and then figure out the theory of it later?
If anyone can offer any advice, i'd be much appreciative