After 180 days, you must leave Indonesia. But you can apply for a new visa.
If you visit often, the D1 multiple-entry visa is a good choice: you get up to 180 days per stay, and it's valid for 1, 2 or 5 years. For a long-term stay, a KITAS is the better option, e.g., the E33G Remote Worker visa or the Retirement KITAS if you are already retired.
We're happy to advise you.