If you are not sure what source voltage you got, and what final voltage you need, the best is first boost then buck. This gives you the most flexible solution at the cost of efficiency (80% range best case).
Use any wall-wart with sufficient power at any voltage within range (say an LM2577, it will take anything from 2 V range to about 30 V. Now boost that 2-30V to the LM2577’s max -around 27V. Buck that down with the LM2596 to the desire end voltage by adjusting just the LM2596. So you end up with a Boost-Buck that will accept any input voltage (2-30V range), and output any voltage (1.25 to around 27V) and merely single adjustment at the LM2596.
I use a cheap board that does the job just that way.
But, the lower the input voltage, the less the efficiency - just the Laws of Physics. So if your wall-wart is merely 2Volts and you want 20V out, be prepare to see efficiency well below 50%.
Rick