Choosing between a digital and an acoustic piano really depends on your specific needs and limitations. In a small apartment, a digital piano might be more practical as they require less space, can be used with headphones for silent practice, and generally need no tuning or other maintenance. Many modern digital pianos offer weighted keys that mimic the feel of an acoustic piano quite well.
However, if authentic sound and feel are priorities and you can accommodate it, nothing beats an acoustic piano. They provide a level of nuanced expression that even the best digital models can struggle to match.
For beginners on a budget in tight spaces, I recommend looking at digital models like the Yamaha P-45 or Casio Privia PX-160. They are both affordable and own features that provide a good starting point for learning. If choosing an acoustic, consider looking for used upright pianos from reputable brands; they can often be found in good condition at reasonable prices.