Humanity already has the ability to heal naturally, so why invent bandages?
Humanity can, in fact, do a lot of things. We can talk to each other over distances by shouting. We can write on paper. We can run. So why invent telephones, typewriters, and automobiles? Because there's always a reason to do something faster, better, or for longer periods of time, etc. Magic might (maybe) slow the march of science, but it wouldn't stop it unless your magic is godlike — but that's really boring and you seem to want a story that incorporates both magic and science.
So really, it's all about developing a consistent magic system that has practical limitations: such as humanity's ability to heal not being particularly good at fixing compound fractures or the desire to develop vaccines because the natural method requires a honking boatload of death before immunity sets in.
1. Just as using your muscles tires the muscles and using your mind tires the mind, using magic tires the magic user
Your magic system requires a method of exhausting the magic user. Why develop agriculture in its most primitive form if a wave of your godlike finger provides all the food you need whenever you need it or shields you from climate when it becomes inconvenient? That way-too-overused concept of "mana" helps us conceptualize the consequences of effort — but you needn't be so detailed if you don't want to. All you really need to do is create a basic chart of spell complexity and spell consequence vs. level of exhaustion. And remember, human muscle use leads to needing food, water, rest, cleanliness... it has several consequences that all represent some form of consumption necessary for restoration. A well-designed magic system will do something similar.
2. Magic shouldn't be magic, you really can't do everything with it
I'm fond of Tolkien's Lord of the Rings. Who isn't on this Stack? But there are lessons to be learned. None of the magic users or magic-using species could do just anything. Using only Gandalf (much less the Elves, etc.): he couldn't build buildings or just kill the Balrog or feed his troops or guarantee anyone's safety. He was presented as incredibly powerful, but also incredibly limited. In fact, the more mundane the task, the less likely his magic has any significant benefit at all.
Your magic system should do the same. Frankly, every magic system must do the same. Remember, godlike characters are boring. Nobody can relate to them and there's no way to develop a serious crisis around them. Why do you need shovels? Maybe it's because magic can't form a trench in anything resembling a straight line.
3. Who wants to stand around for hours while others use the consequences of magic?
I've once thought that the most valuable use of a superpower that opened portals to other locations would be to get a job at FedEx. Think about it. You'd be worth millions... billions... saving time, maintenance, equipment, fuel... what an asset you'd be. And then I realized that it would be the most boring career you could possibly have. I mean, you can open gates to other places... and what are you doing? You're sitting on a chair sipping protein shakes and Red Bulls day in and day out while forklifts move pallets of boxes to and fro. Blech.
Perhaps more to the point, why would you invent a telescope? Because asking a magic user to stand there for hours losing sleep while you look at the night sky might cost you more than a couple of beers. And if you could use the magic yourself, then you're concentrating on that spell while you're also concentrating on using that spell and scribbling down your findings. Headache!
4. Everyone cannot use magic equally.
Humans all have muscles, so why invent pallet jacks, dollies, or wheelbarrows? The obvious reason is to move more material more conveniently than any muscle-bound Adonis with rippling pecs ever could. But tools such as those are also equalizers. They allow people of many levels of strength to accomplish the same basic task.
In reality, your magic-using peoples won't be capable of using magic equally. It's entirely undesirable that they could (godlike...). Children must learn skills while talent grows. Adults may be proficient at one type of magic but not another. One individual may be capable of moving the proverbial mountain while another has trouble pushing a spoon. That diversity of capability will drive the desire to develop science that equalizes what people can do.
And that assumes that you don't have some people who simply have no skill for magic. My sister can play the piano. The got her college degree in it. She's amazing. While I... I've either been taught or taught myself to play three times. It doesn't stick. I have no natural creativity behind what I do and can't use the skill for any practical purpose (or even an impractical purpose... other than to make people laugh, maybe). You'll have magic users in these kinds of groups, too.
5. Magic has an ecological price
When you're a young society plowing the ground with horses and clearing trees with axes you don't need to worry about the fact that you're the reason the soil is eroding with every rainstorm and being depleted of nutrients with every crop. You don't realize that a herd of wild cows periodically culled by wolves doesn't poison the ground with too much dung but keeping dozens or a hundred head of cattle in one spot all the time does. I'm not a fan (or an advocate) of the "Bad Human!" political agenda — but I'm not a fool, either (at least not often, I hope).
Newton's third law has an amazing number of applications. For every action there is an equal and opposite reaction. For every effort to rise above nature there's an equal and opposite consequence to nature. Agriculture leads to erosion. Animal husbandry leads to soil poisoning. All of it affects the natural carbon cycle. Etc. Most authors never bother to mine this potentially useful consequence of magic to fill their stories with purpose — using magic to overcome nature negatively affects nature.
Obviously the more impressive the magic the more disastrous the effect, and you'll need to develop your magic system so that there are a variety of effects great and small (if you're thinking, "Star Trek warp speed limitations!" you're on the right track).
Magic has limitations. It must or your stories will be two-dimensional and boring. Your characters will feel like cardboard and be unrelatable.
And because it has limitations — there will be science.
Necessity is the mother of invention.