This decision is very individual and depends on your possibilities and needs.
As a classical piano teacher, I always recommend an acoustic piano as it offers a unique playing experience. The direct connection between fingers, action and soundboard enables very fine sound shaping, which is particularly important for musical development.
However, an acoustic piano also has practical disadvantages: It needs to be tuned regularly, is difficult to transport and can be of limited use in light-hearted homes or in the evening.
Modern electric pianos today offer a very good keyboard and a realistic playing feel – especially in the higher price ranges. They do not need to be tuned, the volume can be adjusted and you can practice quietly at any time using headphones. They are also flexible and easy to transport.
In terms of price, the difference between a high-quality electric piano and a good used piano is often not that far apart.
It is best to try out both options yourself. Renting an acoustic piano for a while can also help you make the right decision.