I’ve found a basic barbell program to be wonders, but as Tony mentioned, form is critical. It is also important on machines, but machines do the stabilization work for you and are rarely compound exercises, meaning your overal strength doesn’t increase as fast as with free weights. Barbell weights can also be increased in extremely small increments (most gyms have 2.5 pound plates, you can also buy micro plates), while dumbells increase by 10 pounds typically after 20lb (5 lb per hand = 10).
Watch some videos by Mark Ripptoe (great series on here - https://m.youtube.com/watch?v=QhVC_AnZYYM ) and check out the 5x5 Stronglift app for your phone. It has built in rest timers, tracks your stuff, and will determine if you’ve hit a platoue and how to break through it. The paid version is cheap and has some other really nice features with an overall simple interface. They do have videos of form as well.
Expect to hit the gym 3 days a week, taking 1 day rest between days 1/2 lifting, and 2 days after the 3rd day. It’s extremely simple and effective. This is coming from a guy who runs chainsaws and tosses logs for a large part of his work day.