As programs get bigger, there is an inevitable tendency for the code to get messier and more difficult to work with. For larger programs, it is essential to organise code well, and methods form one of the most important tools for doing this.
It is widely recognised now that programmers should write methods which are no more than about 30 lines long, with very few exceptions. What is more, this advice is intended for expert programmers. For beginners, it is better to stick to a limit of around 10 lines per method.
As well as organising code into manageable pieces, methods also make code easier to reuse, easier to read, and more flexible. Changing the design of code is called refactoring and is an important skill.