Due to the different orbits of the planets in our solar system, it's actually impossible for them all to come into anything that might resemble an alignment from our perspective on Earth. Though we're often taught that the solar system is a flat plane where all of the planets orbit on the exact same level, each planet has its own unique orbit within the ecliptic, an imaginary line in the sky that marks the path of the sun. Mercury has the most deviation, within 7 degrees of the ecliptic, but the other planets vary around 3 degrees from perfectly flat.
That also doesn't include the other objects in the solar system. Former planet Pluto has a 17-degree deviation from the orbital plane of the solar system, and other dwarf planets are even more erratic compared to the eight main planets. While these numbers might not sound very big, it's enough to make planetary alignment pretty much impossible from our perspective on planet Earth, the "third rock from the sun."
If you instead try to imagine the eight major planets in a single line stretching out from the sun (and within 1 degree of each other), it's estimated this occurs roughly every 13.4 trillion years. For context, our solar system is 4.5 billion years old, and the universe is only 13.7 billion years old. So this alignment has likely never happened — and will never happen, as the sun is expected to expand to become a red giant in roughly 5 billion years, wiping out Mercury and Venus for sure and coming dangerously close to Earth.