Recent University of St Andrews Graduate here, with many friends and family members having gone to Edinburgh University. Firstly I'd like to mention that I honestly believe there is no real wrong answer, both are amazing universities and will provide you all the tools you need to find success in your future. Speaking from only my experience, I believe that St Andrews has a really large focus on providing students the support they need with their studies, they have a super helpful student services team which is tightly integrated with the school, questionnaires and surveys for different modules which students are highly encouraged to fill out at the end of each semester, a highly flexible degree structure where you can really specialise into something you're interested in, and a really tight close knit community of Professors, Undergrads and Postgrads. I think the combination of these things allows St Andrews to continue improving their delivery of modules and therefore allow students to thrive, hence the high student satisfaction. As per how important that is? I think it really depends on how much you might "struggle" with your studies, I've met a few people who've studied physics from both universities and believe it can be quite an intense, difficult subject. At the most difficult times, it can be very useful to have people who will work with and help you succeed to the best of your abilities. As per the weaknesses of St Andrews in relation to Edinburgh, I think that indeed you may miss out on the spectacular Edinburgh city life experience. In St Andrews, many students actually travel to Dundee or Edinburgh during breaks or weekends just to experience a more exciting city life! For me, it wasn't so much an issue as the lack of city life actually allowed me to better focus on my studies, and I enjoyed simply being able to spend time with my friends at their flats/school laboratories. I also think that St Andrews is much less impressive in the Postgrad department than Edinburgh in terms of research, and probably resources (though I'm only speaking from the school I attended, the school of Computer Science) - for undergrad however, I'm sure you will be learning very similar things either way. If you've the chance to, I'd highly recommend going to open days for both universities so that you can have a look around the campuses, learn about how specific courses are delivered, meet some of the students/staff, ask questions, etc etc. Best of luck with your application!