a couple of other philosophers of science have speculated that the goal of science isn’t to find laws of nature. And in essence scientific laws are simply empirical conclusions reached by scientific method; they are intended to be neither laden with ontological commitments nor statements of logical absolutes.
https://plato.stanford.edu/entries/laws-of-nature/#HumSup
Check this article out for further reading if you’d like.
It’s worth mentioning however that majority of philosophers are realists about laws of nature