At 10, your child (if in the US) is in 4th or 5th grade. The maximum recommendation for homework duration at that age is 40 or 50 minutes. And there's also good evidence that anygood evidence that much of the homework typically assigned, especially prior to secondary school, hurts more than it helps. So, depending on your appetite for conflict, you could include talking with your child's teachers and/or school administrators, especially if the assigned homework is regularly taking longer than that, when youyour child is moderately focused on thatthe task. If your child is doing well on assessments and in-class work, you'll have more leverage, but I don't think that should be entirely determinative.
Then, you could work with your child to set aside that fixed period of time for homework - maybe not the first 40-50 minutes after school, but a solid chunk of time where they're focused. If you demonstrate that you're on their team by helping them advocate for a reasonable amount of homework, then they may be more willing to engage in that time-boxed effort. If you have the ability to sit with them - perhaps doing some administrative task of your own - for that time, even better, especially at the beginning.
At a certain age, around 12 or 13, I think that encouragement and support, but allowing the natural consequences of poor grades to be the primary motivator, is a good approach. But that requires having first made a real effort to instill good study and time management habits at an earlier age, so that they have the internal tools to make and act on the decision that doing the homework is preferable to the consequences of not doing it.