It seems there are at least a few contenders for the title of oldest known pyramids, including:
The earliest known Egyptian pyramids are found at Saqqara, northwest of Memphis. The earliest among these is the Pyramid of Djoser (constructed 2630 BCE–2611 BCE) which was built during the third dynasty. This pyramid and its surrounding complex were designed by the architect Imhotep, and are generally considered to be the world's oldest monumental structures constructed of dressed masonry.
(strictly speaking, Egyptian pyramids are claiming to be the oldest "monumental structures constructed of dressed masonry", and it is not clear - to me as a layperson - that the other pyramids compete in this category)
In addition, 90% of all these experts said that the the Bosnian pyramids are by far the world’s largest and oldest pyramids. There are five (5) pyramids in Bosnia and it is said that they are 12000-26000 years old. In 2010 UNESCO added the Bosnian pyramids into their World Heritage sites.
I note that the UNESCO site does not seem to list any Bosnian pyramids.
Dating from 3000BC, the oldest of the Brazilian pyramids predate the earliest Egyptian example by several hundred years.
Archaeologist Ruth Shady further explored the 5,000 year-old city of pyramids in the Peruvian desert, with its elaborate complex of temples, an amphitheater and ordinary houses.
I think it is fair to define "pyramid" as: a monumental structure with a square or triangular base and sloping sides that meet at the top in a point.
So which pyramids take the prize for being the first built?