How is it breaking the law?
President Trump can fire anyone he wants.
A county sheriff is not a member of the executive branch of the federal government! A county sheriff isn’t even a member of state government. In most states the governor wouldn’t have any authority over a county sheriff, in turns out in Florida the governor does.
Do you not take civics in junior high?
Trump can not fire employees of a county government. He has no authority whatsoever in the government of Coward County. The Governor of Florida can relieve a county sheriff for malfeasance. The President of the United States has no jurisdiction in the matter.