Ancient Greece never really declined. But it did fall.
Historians refer to Ancient Greece as a civilization. That's because it was never an empire. It was never a country. (Greece did not become an independent country until modern times, in 1821, or less than 200 years ago.) Ancient Greece was a collection of independent city-states with a common culture. Most historians agree the Greek culture was a foundation culture of Western Civilization, which means a root or a beginning. There is no doubt that the ancient Greek civilization has been immensely influential on language, literature, educational systems, philosophy, art and architecture, politics, theatre, drama, science, medicine, and mathematics.
The time period called Ancient Greece is considered by some historians to begin with the Greek Dark Ages around 1100 BC (the Dorians) and end when Rome conquered Greece in 146 BC. Other historians start with the 776 BC Greek Olympic Games, after ancient Greece had formed themselves into hundreds of independent Greek city-states, each with their own way of doing things. It's safe to say that the ancient Greek culture covered a lot of years. Ancient Greece was at its pinnacle from 776 BC to 146 BC. For a very short period of time, within that pinnacle, the ancient Greek city-states were pulled together under one rule - not their own rule, but the rule of Alexander the Great.
Alexander the Great conquered the ancient Greek city-states in 338 BC. Alexander ruled for about 13 years. Alexander died young. He was only 32 (or possibly 33) years old. He was off conquering other lands when he died. He respected and admired the Greek culture. He felt it was his mission to spread Greek culture to other lands. During his rule, Alexander spread Greek culture throughout the Persian Empire, including parts of Asia and Africa. After his death, the ancient Greek city-states did regain their independence. But the teachings of Alexander remained. The Hellenistic Age was the time after Alexander's death when Greek culture mixed with the various cultures of Alexander's Empire. This was a time of advances in learning, math, art, and architecture. Some of the great names of learning in this Age include Archimedes, Hero, and Euclid. It was a time of relative peace. (The Hellenistic Age began with Alexander's death and ended about 200 years later when the Romans conquered the Mediterranean region and beyond.)
The ancient Romans: The Romans attacked the ancient Greeks at the Battle of Corinth. The Romans won. But the Romans loved the Greek culture, especially the Greek gods and Greek myths, just like Alexander. The Romans adopted all the Greek gods and all the myths, changing them a bit to reflect the Roman way of life. As long as the ancient Greeks agreed to consider Rome in charge, the Greeks were free to mostly manage themselves. Even their language remained the same. Once again, the ancient Greek culture survived. In fact, it expanded - as the Romans expanded into Europe, they brought with them the Greek culture, which by then they claimed was the Roman culture. (The Romans often did that - adopt something, and then pretend it was Roman all along.)
Alexander spread the Greek culture around the Mediterranean, and the Romans spread the Greek culture into Europe. Greek culture is still influential today. That's why historians say Ancient Greece never really declined. But it did fall.
Not a Decline but the Fall of Ancient Greece
What is the difference between a country, an empire, and a city-state?