Mac keeps warning me about the battery problem on the top bar My Mac (2017 12' MacBook) keeps me warning about the battery problem when I tap on the battery icon on the top bar. It showed battery repair (the exact English phrase might be different) with a warning icon.

However, I'm not sure what is the problem of the battery in my MacBook. Currently, the battery cycle is 829 and the manufacture date is 2017-06-19. Is it just that the battery is consumed too much and Apple encourages me to change to a new one or is there a serious problem with the battery?

If there is a real problem, how can I detect it and what should I do? The battery swap is quite costly (over $100) so I would rather like to avoid it (well, I'm fine with buying a new laptop but the problem is Apple ditched 12' MacBook).
When you see the "Replace Battery" warning icon, it's because your Mac has detected an issue with the battery and it needs to be replaced.  You can continue to use your Mac with no problem, but understand as the battery degrades, you'll get less and less charge meaning you'll be tethered to a wall outlet more and more.   The only time you really need to worry is if the battery starts to swell. 

This is based on information it's getting back from the battery's on board chip that stores information like cycle count, current maximum charge, the initial maximum charge, etc. as well as measurements and calculations the MacBook is doing.


  Currently, the battery cycle is 829 and the manufacture date is 2017-06-19.


This is normal.  Batteries have a lifespan of about 1000 cycles and a life of 3 to 5 years.  This one is a bit on the early side of the curve, but not unexpected.  These numbers are derived from testing and modeling - there's no way to say that a battery is guaranteed 1000 cycles and exactly 4 years of life.  


  Is it just that the battery has consumed too much and Apple encourages me to change to a new one or is there a serious problem on the battery?


No.  Apple doesn't "encourage" you to change your battery after a specified amount of time/cycles.  You're getting this because the battery is no longer capable of supplying the amount of charge as spec'd out by Apple.  

What could cause it?


failing/defective battery cell
buildup of the SEI layer (normal wear)
exposure to temperature extremes
physical damage


What is it exactly?  It's impossible to know.  We don't have the ability to "peer into" the battery pack and look at all the conditions in there (well, we do in the lab, but not in the computer).  The best we can do is take some measurements and make an educated guess - that's what the computer is doing when you get the battery health info.

Replacing the Battery

Typically Apple (and ASRs) will replace the entire top case of the MacBook.  However, if you have some technical skill (or know someone who does) and some patience, you can replace the battery itself; iFixit.com has excellent instructions