Advance tickets go on sale 12 weeks ahead of time. They start off cheap and once a certain amount is sold the price goes up. That keeps going until all advanced tickets are sold and you can only buy “anytime” tickets.
I’m sure there’s a system for how many advance tickets there are for each route, but I can’t find any reference to it.
The system is called RARS, the quotas are set by the train operating companies and there's no transparency whatsoever as to how many tickets there are available per train service/journey segment at each price point (commercially sensitive). The most you'll get is a "there's 2 tickets left", I think for all n <= 9
Advance fare tiers are also not regulated by the Govt fares increase cap, so the operators can charge what they like.