To really learn who you are and grow as a person, you need both. when you are single you are stuck with yourself so there is no way to avoid yourself and that creates great learning possibilities. I've been single for quiet a long time and I think it was a good thing to find out who I am, what I want, learn to accept myself, ...
But you can alos learn a lot about yourself by being in a relationship, things you can't learn when you are single. In a relationship you have to posibility to learn to communicate, open yourself up to an other being, show who you are, stand up for yourself but also to do something you don't like to do. Your partner can help you to broather your experiences, learn new things, get out of your comfort zone. I'm in a relationship for 6 months now and I can't say it as been smooth. But I have learned a lot about myself, my behavior towards other people, .. I have learned that a lot of my reactions are still programmed behaviours that I have learned through my childhood. Also a lot of my values are derived from my parents. And now I know, I can work on it and my boyfriend function as a mirror. I wouldn't have had this opportunity when I was single (nore the help from an other person) and that would limit my freedom
But this doesn't mean you should be in a relationship just to be in a relationship. A lot of people are stuck in a relationship that does not give them the oportunity to be themselves or improve themselves. So I think you should be really picky about who you choose to be with. It should be someone who respects you and is willing to go on a journey to you where both of you are willing to give and take and change for growth