Can you get abs by only doing push-ups?
Yes, you can get abs if the only exercise you ever do is pushups.
You can even get abs without ever doing direct ab Work
The pushups won't really help to make the abs show, but you can still get the abs if your diet is correctly tuned for fat loss.
Abs are made in the kitchen - they show when the layer of fat on the stomach is thin enough for them to be visible. You need to maintain a caloric deficit for enough time for your body fat to reduce to suitable levels.
You can determine your daily caloric and macro nutrient needs based on activity level here: Body Comp/Macro Calc
Follow me on Instagram for more content and help at Joe.Lifts.Bro