Protect battery supply and arduino

Yep agree.. the LM2596 will handle a variable input. Either plug into your wall charger or 20v battery... the output will still be 5v.

Just put this in front of your LM2596 and plug into that...
https://tr.aliexpress.com/item/32992149558.html?src=google&src=google&albch=shopping&acnt=494-037-6276&slnk=&plac=&mtctp=&albbt=Google_7_shopping&albagn=888888&isSmbAutoCall=false&needSmbHouyi=false&albcp=9444695485&albag=99457316601&trgt=296904914040&crea=en32992149558&netw=u&device=c&albpg=296904914040&albpd=en32992149558&gclid=CjwKCAjw_L6LBhBbEiwA4c46ujMIuvXVLBy9hrYNs71U0Tjpn_dve3onOLBEoBgBcqm6kTjUW65lMRoCfvMQAvD_BwE&gclsrc=aw.ds&aff_fcid=57390477ea4b46a386e2058bbe9e2dd4-1634770838137-08386-UneMJZVf&aff_fsk=UneMJZVf&aff_platform=aaf&sk=UneMJZVf&aff_trace_key=57390477ea4b46a386e2058bbe9e2dd4-1634770838137-08386-UneMJZVf&terminal_id=7a7ea789f98149ab9a675acb57129e38