My first guitar teacher, Neefa van der Schyff, used to encourage me to practice by saying that your relationship with your guitar is like your relationship with any good friend: neglect it and the relationship goes sour, treat it well and the relationship grows.
If you want to have a closer relationships, the formula is simple: time, attention and love and a big part of that time and attention is spent on mastering the various guitar techniques required to confidently perform a piece of music.
Translated into guitar speak this spells P-R-A-C-T-I-C-E.
While all practice is good, there are better and worse ways of practicing or more efficient and less efficient ways of practicing. While it is fun to practice pieces, guitar technique needs to be an aspect included in all practice sessions. Other aspects are repertoire and musicality, but without guitar technique these other two aspects may fall flat as you might not have the technical stretch required to achieve the ease of flow required for the musicality or the dynamic control or finger strenth required for expression.
Guitar technique supports your practice by providing exercises in the basic techniques of the classical guitar.
To inspire and to get you started, below is a video by David Russell.
You'll need to go a little deeper into music theory as you proceed. The best online resource for this is Guitar Theory Revolution. It recognises that music theory is very hard for guitarists because music theory has till now been located in the piano paradigm. The Guitar Theory Revolution overthrows the piano paradigm that is holding you back and embraces the attributes of the guitar to unpack music theory. In fact, it goes further and allows you to see that the guitar is one of the best instruments for learning theory.