There's no right or wrong way to do it. Eat at a caloric surplus, at least 500kcal above your TDEE (total daily energy expenditure) - if you don't know yours there's a bunch of free calculators you can use online. I would use three and take the average.
I'd follow a program such as StrongLiftts, SS, or any other beginner program that follows linear progression to build a strength base. Feel free to do bodybuilding in addition to the program, but keep your recovery in mind, adequate food, rest, etc. You'll get there