When I went back to school for CS, I used this book https://a.co/d/7hlRdnK to relearn math. I couldn’t recommend it more.
It starts with algebra and works through calculus. There is a pretest before every section, so you know what you need to focus on and what you can skip.