Use a rat cage: put the food in a rat cage, and then put the rat cage in a place where rats often appear until the rats bite.
Use a mousetrap: Put the mousetrap in a place where rats often appear, waiting for the rats to take the bait, but the mousetrap is powerful, so it is best not to put it in a crowded place to avoid accidental injury.
Use rat poison: Rat poison is highly toxic, so it's best to put it in the corner to avoid other pets eating it by mistake.
Cat: Cats are natural enemies of mice. Keeping one can prevent mice.