When you have all twelve artifacts, return to the Artifact Temple.
There is a cutscene where the statues shine beams of light into the central pillar, which shoots a beacon into the sky. Apparently the Chozo didn't count on there being a giant pterodactyl cyborg in the area because just then Meta Ridley swoops in and a battle begins.
Despite the buildup since the beginning of the game, this boss is actually a bit easier than the last one. It does seem easier than it actually is at first though.
In the first part of the battle Meta Ridley hovers in the air to shoot either missiles or an energy beam at you. Its weak spot is on its chest, and it's exposed now, so fire when you're not trying to dodge the attacks. The Charged Plasma Beam and Super Missile do well here. Occasionally Meta Ridley will jump down to stomp on you and smash some of the statues at the same time. You may get pickups from the statues but it's not very significant. Don't waste missiles attacking when the monster is on the ground because its weak spot isn't exposed.
After a short time Meta Ridley seems to fly away, but it's not gone. This is part of its other method of attack where it swoops over you and either drops bombs or fires its energy beam. It's moving too fast to hit, so just try to keep moving to avoid taking too much damage. Switch to Morph Ball and Boost across the floor to get the best speed. After two swoops the monster switches back to its hovering tactic.
All this is actually not too hard to deal with, and you should be able to get Ridley down to a quarter health without taking much damage yourself. At this point though Ridley's wings burn away and it's forced to fight on the ground. The problem is that it's actually more fierce now than before, so even though it may seem like you're way ahead on health, you're not out of danger yet.
On the ground, Ridley attacks by charging at you. Dodge as best as you can, then back away because it will switch its tail around when it turns to face you and getting hit with the tail will hurt. Its chest is never exposed now, but if you shoot it in its mouth enough times it will stand up and you can get some damage in. Ridley flashes yellow when you get its mouth to show that you're on the right track even if you're not doing damage.
Unfortunately it keeps its mouth shut most of the time so even shooting there requires some timing. Once in a while it will stop charging for a bit and fire an energy beam out of its mouth, and this is the best opportunity. A hit with a Charged Plasma Beam will usually get it to stand in one shot. When Ridley does stand up, make sure its chest is targeted and fire a Charged Plasma Beam followed by repeated single shots with the Plasma Beam until it bends down again. After this, there's a good chance that Ridley will open its mouth again so with a bit of luck you can get a chain of these attacks going.
It will take a few times hitting Ridley in the chest this way to bring its health down to zero. At this point some of the statues above the temple will pitch in and finish off Ridley for good (at least until the next game).
When the battle is over the statues will long since have been destroyed. But the energy inside them is still there and they combine together, with help of Chozo spirits, to create a portal into the next area.