Do I need Math HL for comp science undergrad Watch
In the UK, most, but not all, CS programmes require A-level Maths or equivalent (i.e. IB HL Maths - some might specify which of the two formats in the new course you do as well, normally the analysis/approaches version rather than the applications one if they do specify anything). This includes essentially all of the "top" courses e.g. Imperial, Oxbridge, Edinburgh, Southampton, UCL, Warwick, etc. Most of the unis that don't require A-level Maths or equivalent are more applied courses, often at universities that aren't "ranked" as highly in academic league tables (although the relevance of this is dubious), although there are some exceptions (such as I believe Cardiff, which is a more traditional CS course but doesn't require A-level Maths as far s I know).
The requirement isn't a spurious one though, and it's because those courses (and more generally, the field itself) will be necessarily mathematical. Although not all areas of CS are highly mathematical, at least some are, including most of the more theoretical aspects which are emphasised in those "top" courses. Remember a CS degree is not a degree in programming. Anyone can learn to program, realistically; understanding how and why programming languages work the way they do, how computers execute programs, and how to use these principles to write effective and efficient software, is more what CS is about.
However in the UK there are also many courses available with a foundation year, where for those who didn't study the required subjects to the necessary level, they can undertake a preliminary year 0 and cover that material before progressing onto the main degree programme. Beyond that, those degrees which don't require A-level Maths for entry will usually cover some if not all of that content sooner or later during the degree course as well. Essentially, no matter what CS degree you do, you will almost inevitably cover a large amount of the syllabus you are currently studying anyway.
Bear in mind on the course this will be covered much more rapildy (think two 1 hour lectures to cover what you might spend a couple weeks on in school), with much more independent study required from you to learn the principles as well as practice them, and generally less opportunity for individual attention (you will probably be part of a lecture cohort of 100-200 students, and the lecturer will have limtied office hours. Your best opportunity will be to ask questions in tutorials which will have more school class like sizes, but usually are run by PhDs and postdocs rather than the lecturer themselves). Also worth noting is lecturers (and PhDs/postdocs) are not normally employed for their teaching ability, but for their research work - they just teach as well as doing that. The extent of teaching training lecturers will have had will vary enormously. Teachers in school will have specifically trained for pedagogy, however, so are also probably better at teaching, in general, to begin with.
The point of all the above is to highlight the fact that, if you're currently struggling in maths, you might well struggle with quite a few CS courses in the UK at least. You may then want to think about where your strengths lie, and whether what you wish to do in the future is an accurate reflection of this. It may also be worth investigating the subject area more to make sure you don't have any misconceptions about what it entails, so you can make an informed decision.
That aside, Blue_Cow may be able to offer some more advice/context for the maths in a CS course (I may be overstating the extent of it, as I wasn't studying CS but EE).