That's a good idea. Regarding the process, I think ^TheDom clarified everything here. If you approach it as you have planned it out, you will succeed. It's all about consistency and ability to maintain hard work over time, sensibly. For any newbie starting out I would suggest a following, very adjustable and really 'all about the foundations', approach model:
Get into some sports and train hard. Most universal and recommended for most people's purposes would be gym, unless you are already quite competitive at some sport. Up your protein intake to at least 1.5g/kg of body mass (preferably just hit >1.8 regularly), limit your fat consumption (especially processed fat and overload of trans fat; figure out your most optimal fat intake by doing some individualized research), then preferably eat more low-IG carbs than monosaccharides on daily basis, but in the end it doesn't matter much until hitting the higher tier- imho. Lastly- count your calories; be in a deficit (progressive one- by calories and/or activity levels) to lose fat, then keep upping your calories as you grow over time in order to gain muscle (gotta gain weight to gain muscle (*except for <6 months gym experience newbies and <12 months for those slacking off)).
Oh, the most important part. Just eat fucking healthy. Everyone has their process, but we all know what we should eat, what's good for us, and what diet model is necessary for our purposes, don't we? It's not that food is shit nowadays- this too to an extent, but not really a significant issue unless you just overeat on junk and clear all the cheapest premade food shelfs regularly. People have wrong eating habits, choosing the wrong products constantly, eating 80-100 grams of protein per 3000 kcal in total and that's from all the non-meat/non-dairy processed food pretty much is probably what your average Dick fucking consumes. If these macros were at least in a rich-in-veggies, self-made meals, that's not, well, not open to a debate anyway, but at least not sanctioned. Change your eating habits, cook your own meals or choose higher quality, not supermarket premade, but some decent takeaways or restaurant/order-out meals. Actually, best of all - CATERING. I don't use personally, but would use if I could (have to avoid certain ingredients).
That's it. You just have to be diligent ;-)