Car financing with 17- Is that possible?H

Hello, the following question, I am 17 years old and have my driver’s license and will be 18 in 3 months. Would you like to buy me a car, since it can be used by my mother. Since I am an apprentice and I have a good regulated income I want to finance the car through me. The car should cost 4000€ I would pay 2000€ and the rest according to the rate. But is this purely from the legal point of view? I definitely have the consent of my parents! Thanks in advance already for the answers! Greeting Robert