I got myself a digital stage piano a couple of years ago because I didn't want to give up music while camping, and space is tight at home too. The Yamaha P-525 is a solid choice for that - the keyboard really feels great when you're playing, and the sound selection is completely sufficient for hobby musicians. Compared to an acoustic piano, you've got the huge advantage that you can practice with headphones without annoying your neighbors. Honestly, that's a game changer if you want to train regularly.
To clarify the differences: these days, the keyboard on good digital pianos doesn't feel like plastic anymore - Yamaha uses real weighted keys that mimic the resistance of an acoustic piano. The sounds have also gotten way better than they were 10 years ago. Where there are still differences is in the response with really fast runs or the subtle nuances when playing with the pedal, but for normal practice and jamming with friends you barely notice it.
From my experience: if you mainly want to practice and don't need to be concert-ready, a digital stage piano is the better solution than not having an instrument at all. The P-525 also has usable drum patterns and automatic accompaniment on board if you guys want to experiment with that while jamming. Skip spending the money on a real piano - you don't need that as a casual player.