Some of the greatest science fiction movies ever made more or less answer the question.
The Forbidden Planet (1956)
There is the goofy movie The Wizard of Mars (1965), sort of a low budget mix of The Wizard of Oz (1939) and The Forbidden Planet (1956), in which astronauts find relics of an extinct alien civilization.
And of course how could I have forgotten the BBC serial Quatermass and the Pit (22 December 1958-26 January 1959) which was adapted to make the great science fiction movie Quatermass and the Pit (1967) called Five Million Years to Earth in the USA.
2001: A Space Odyssey (1968)
2010: The Year We Make Contact (1984)
Star Trek episodes and movies which sort of satisfy your requirements include:
"The Man Trap" (8 September 1966)
"What Are little Girls Made of?" (20 October 1966)
"Return to Tomorrow" (9 February 1968)
"That which Survives" (24 January 1969)
"Beyond the Farthest Star" (8 September 1973) Animated
"The Slaver Weapon" (15 December 1973) Animated
"How Sharper Than a Serpent's Tooth" (5 October 1974) animated
Star Trek: The Motion Picture (1979)
Star Trek IV: The Voyage Home (1986)
Star Trek: The Next Generation "The Last outpost" (17 October 1987)
Star Trek: The Next Generation "The Arsenal of Freedom" (9 April 1988)
Star Trek: The Next Generation "Contagion" (18 March 1988)
Star Trek: The Next Generation "The Inner light" (June 1, 1992)
Star Trek: The Next Generation "The Chase" (24 April 1993)
Star Trek: The Next Generation "Masks" (19 February 1994)
No doubt there are many more movies and episodes I can't think of at the moment.