YJ-12 was sort of the land, air and sea launched supersonic cruise missile that performed anti-surface and anti-ship roles. Land and sea based YJ-12 range should be around 500km (although we heard in past true range is longer) while air launched should be more if booster is the same but air launched booster might be smaller or different so air launched YJ-12 range could be comparable to the ship and land launched version. We've never seen a J-15 carry YJ-12. So while India's air launched Brahmos is Su-30MKI carried only. China's YJ-12 air launched version has only been carried by H-6. Both H-6 and Su-30MKI are land based aircraft.
Now YJ-15 can be considered a carrier based launched supersonic missile since it supposedly can be J-15 launched and the size does look considerably shorter and slightly thinner than YJ-12 and Brahmos. this gives the missile much more range and flexibility of use.
But air launched Brahmos is highest end in Indian service. China has hypersonic cruise missiles that can be sea, air and land launched. Hypersonic glide missiles too and hypersonic cruise and/or glide that as of now confirmed at least 6 types overall (DF-16, H-6 ALBM, DF-17, DF-27, YJ-17, YJ-20) that can be sea, air and land launched. Now also has YJ-15 that can be ship and air launched as another smaller supersonic cruise missile that probably retains similar range as the larger ones - YJ-12. Let's not forget all the stealth cruise missiles in PLA service. We haven't counted the anti-ship ballistic missiles DF-21D and DF-26 or the near hypersonic DF-100 cruise missile.
They will also have smaller supersonic cruise missiles replacing YJ-15 as YJ-15 is supposedly acting as stop-gap for carrier fighter launched supersonic anti-ship missile. All of this is many leagues higher than what India has managed to do with a joint venture of a Soviet missile the P-800 Oniks derived Brahmos. We wont even bother counting the numbers in service and the manufacturing rate.
Also YJ-12 numbers are numerously more than Brahmos. India required Russian parts for Brahmos still. YJ-12 can be pumped out at whatever rate desired. We haven't even gotten into the aircraft numbers and capabilities gap between India and China. It is not a comparison. It is a comical comparison, gapped greater than 1990 China and 2025 US.
China has all types covered, 3 times over at least, with higher production rate, lower costs most likely and has tiers of higher level weapons the others don't even have... except the US and Russia who have a few of the arsenal China has already fielded.