I have 2d car and ball. I want car will follow ball in x axes.I need al actually.
Perhaps the above tutorial video will assist you.
However, in the future, you should consider breaking your problem down into manageable parts and trying to look up, learn, and/or execute/write those parts first before asking. When you do come to ask, you should provide the parts you’ve made, and explain the problem, etc…
Try learning some introductory concepts for Unity/C# – they will help you a lot