Achieving MPPT of a solar panel with LM2596
Although MPPT trackers are based around typically a buck converter, there's additional actions from  a control loop, in hardware or programming, that actively tracks the point where maximum power is being drawn from the cell - this varies a little with solar intensity, so you might find a fixed voltage that is good enough for most conditions, but it also varies a lot with cell temperature, so the controller does need to be able to compensate.

Since the solar intensity and cell temperature can vary, an MPPT tracker constantly adjusts the set point up and down, and compares the power generated, and aims to settle at the peak.To be able to vary the input, the controller changes the duty cycle of the buck converter, but obviously this assumes that the load (the battery pack) is capable of taking the full output,  and once the battery reaches full charge the controller needs to limit the output voltage too, and the power available at the solar cell goes unused. Regulating only the input voltage would risk overcharging.

Increasing the duty cycle increases the load and decreases the voltage at the solar cell, and a simple regulator wired with the feedback at the input would do the opposite.

You're far batter off getting a dedicated MPPT controller.