Actually nowadays the camera provided by the smart phones are quite capable of letting you practice on composition, lighting, exposure etc. the basics of photography.
For slightly more advanced technics like dof, understanding all the manual settings, a prosumer, 4/3 or beginner dslr can more than satisfy.
After that, if you want to play around with IR, low light, long exposure, sports, macro, birds, then you might need to upgrade your equipment or buy more specialized lens.
As a start, will recommend reading up on the difference between prosumer,4/3, dslr to understand which type u want to buy. Esp 4/3 and dslr as it's really an ecosystem on its own, with lens, filters, speed light etc. not just a camera anymore.
And yes will recommend buying 2nd hands first since you are just starting out.
Soon anyway you will succumb to the bbb syndrome
Hv fun & start shooting!