One midi ch two 2 midi ch out

I have cubase 12 and my Yamaha PSR keyboard
Now I try to make a song, I have midi track for ch 1 and ch 2
these track playing together the same midi note
Now I want to write automation, But cubase only allow for one midi track.
I try to glue these track and I set the output to any. But still the cubase cant write the automation to ch “Any”

VST automation or MIDI CC data?

I don’t think this statement is correct.

Can you please take some screenshots to accompany your question? I think it will make it easier for other users to understand what you are trying to do.

In a nutshell, every MIDI data event (such as Note On, Modwheel CC or Pitch Bend) is stored with a MIDI channel number. This means you can have MIDI going to multiple different MIDI channels in the same MIDI event container IF the MIDI track is set to MIDI channel “Any”.
That being said, Cubase can have multiple MIDI tracks connected to the same MIDI output.

You should be able to click the red “W” on each track in the arrange window, then playback your track and record your automation, but automation is generally for VSTis (there are exceptions to this)
Do you mean you want to record controller information to both tracks? - if so, just select both tracks to record to by pressing the ctrl key and selecting, then hit record - you can then record CCs to as many tracks as you like. If you create overlapping parts, you can use the glue tool from the top toolbar (or right click on the part) to combine the CCs with your midi recording.

Does this help?