The first modern flushable toilet was invented in 1596 by Sir John Harrington. He installed one for his godmother, Queen Elizabeth I.
His invention included a water tank and a flush valve. However, the flush toilet wouldn’t become popular for another 250 years. Most toilets in Medieval Europe were either holes in the ground, communal outhouses, or chamber pots.