The funding of Scottish students tuition fees in Scotland is restricted and has remained the same since 2010 so that limits the number of university places available to Scottish students in Scotland. There are also systems of priority applicants with those living in the 20% most deprived areas (which only counts for about 20% of most deprived families - others live in more mixed areas) or care experienced, refugees etc The highest group get guaranteed entry to courses. This means that on certain courses (eg law at Edinburgh) no one outside a priority group stood a chance of getting a place regardless of how good a candidate they were.
www.bbc.co.uk/news/uk-scotland-edinburgh-east-fife-64247475
We are looking at applying to university soon and I am seriously considering following this mother in this article doing FOI requests to see if there is any point in my son applying for certain courses. No point wasting options on Scottish universities if he was never going to get in.