You should watch/read the tutorials.
The key point about YNAB is that it's envelope budgeting, just digital. You have a separate envelope for every category and every month. When you receive income, you need to immediately allocate it to an envelope - that is, a category and month - based on what you're going to need to spend.
Let's imagine Alice earns £1000 a month and gets paid on the 15th. She needs to cover the £750 rent, which gets paid at the end of each month, and groceries, where they spend £200 a month. (I'm imagining for simplicity that her partner covers everything else.) As soon as Alice gets paid, she
- inputs the income as a transaction, giving her £1000 available to budget
- budgets £750 into rent for that month
- budgets £100 into groceries for that month
- budgets £100 into groceries for next month.
If she then spends £80 on groceries, it'll show her she has £20 left in the groceries envelope for the month - after all, she needs to eat in the first half of next month too, so she can't spend the whole £200 this month! At the end of the month, YNAB automatically takes all the money out of the envelopes for the month that just ended, and puts them in the corresponding envelopes for the new month. So if she doesn't spend anything else until the new month rolls around, she'll then find she has £120 available - the £20 rolls over, and the £100 already budgeted for the new month now becomes available.
She also still has £50 available to budget, which she could put wherever she wants. For example, she could put it in a holiday budget, where it'll sit and roll over every month (hopefully being added to more and more!) until there's enough in there to take a holiday. One thing that's critical to remember, though, is that if you have predictable future expenses, you really ought to budget for them on an ongoing basis. So if you pay £300 a year for car insurance, for example, you really want to be allocating £25 to the car insurance budget every month, rather than finding the full £300 out of that month's pay.