I wouldn't assume that. Newer aircraft have crashed as well.
These aircraft may be old but so many components are swapped out over the years.
Although, aircraft age may be a factor worsened by shortages of talent in aircraft maintenance. And as things fail, the shortage in pilot talent is more likely to turn a correctible situation into a crash.
The F-18’s a typically a very reliable aircraft and have stood the test of time. They are among the best that McDonnell Douglas has ever created and I’m pretty sure they’ll be around for many more decades to come.