The primary function of a PhD is the transfer of status/prestige/signalling power. The institution/university has obtained a certain level of prestige through its professors and the research they publish and by various other means. Obviously, some institutions are more prestigious than others, take MIT and compare it to the average community college.
So you could give yourself a PhD title, but the signalling power of that title would be close to 0. You wouldn't get any more prestige by doing that.
Also note that PhD is a very poor choice if what you're after is acquiring knowledge in a specific field, because in most institutions, you'll be pressured to publish novel research, which optimizes for the popularity/citation count of the work. When learning, what you really need is to put solid fundamentals in place, and expand in a breadth-first fashion. This sometimes takes more time than the deadlines for delivering research allows, so you'll have no choice but to focus on one tiny area that you're actually dealing with, an area that for 99% of the PhD is almost completely irrelevant. (This paragraph is an anecdote, but the point still stands. Of course your adviser has a massive influence, of course there are institutions that will help you thrive, and of course doing a PhD is still very useful, for a lot of reasons.)
Your sentence is grammatically incorrect and I don't understand it. [Hi from Argentina! I also make a lot of mistakes. :)]
Can you explain it using a longer sentence? With a longer sentence sometimes it is easier to understand the question in spite of the errors. (An alternative is to post the question here in your native language, so perhaps autotranlation can help.]
phd is a degree, you dont learn it. But if you are asking can you do computer science research without pursuing a phd. Well the answer depends on variety of factors.
you can learn anything on your own as long as you have a method that works for you and the will to stick at it. Lecturers are not offering you any knowledge which isnt available from plenty of other sources. the only thing you cant get is an actual certificate but the reality is that if you are capable that likely wont matter
So you could give yourself a PhD title, but the signalling power of that title would be close to 0. You wouldn't get any more prestige by doing that.
Also note that PhD is a very poor choice if what you're after is acquiring knowledge in a specific field, because in most institutions, you'll be pressured to publish novel research, which optimizes for the popularity/citation count of the work. When learning, what you really need is to put solid fundamentals in place, and expand in a breadth-first fashion. This sometimes takes more time than the deadlines for delivering research allows, so you'll have no choice but to focus on one tiny area that you're actually dealing with, an area that for 99% of the PhD is almost completely irrelevant. (This paragraph is an anecdote, but the point still stands. Of course your adviser has a massive influence, of course there are institutions that will help you thrive, and of course doing a PhD is still very useful, for a lot of reasons.)