How do improve consistency in your game.
baseball is all about consistency. Im talking about both your consistent stats and results every game. And consistent swing or pitching mechanics game.

Is there any way to learn it.

this is one of my biggest problems. Sometimes I do good in a game, then I do Ok, then I do good again, and then i would have a bad game.
Sometimes I get 2 hits, next game I get none, and the next I get some blooper hits.
Stuff Like that.
Same thing with pitching, Its not my mechanics that I more have to be consistent, because for the most part I have the same motion all the time. But its more like, having a good game, then I walk too much batters, then another game i get 13k

Im improving I don’t know how. But I need to be more consistent in my game.

There are a ton of things you have to do to be consistent in baseball. Whether you are hitting or pitching, you have to practice until your mechanics are perfect and then keep practicing. You have to formulate a game plan and stick with it. You have to be mentally ready for everything that can come your way. It is a long list but to be as consistent as possible, you have to do everything you can to get ready for each season, game, inning, and pitch.