A 5 gallon tank is fine for shrimps, I had 2 separate 5 gallon tanks running with a mix of amano and cherry shrimps for about 5 years.
As NickAu already mentioned, shrimps prefer established mature tanks to settle in as newly set tanks tend to fluctuate a little and shrimps are pretty sensitive to changes in water parameters.
But that’s not to say it won’t work in a new tank, far from it. Just a case of being well prepared beforehand and a little experience and knowledge of keeping good and steady water parameters really helps.
Lots of natural wood, java moss plants, Anubias, Java ferns and floating plants, those sort of low tech plants will be perfectly fine to start with as shrimps do like to have lots of hiding places to feel less stressed about new environments.
The addition of catappa leaves is fairly good for shrimps as this provides a source of food as well as natural decor for shrimps is a good choice to have.
Water temps for cherries is not paramount as long as temp is not under 18C and over 24C, I tended to keep my shrimps between 19C to 22C max. Water flow, does not particularly matter either, slow water flow or a little turbulence is fine as shrimps are not fussed as long as there are places where they can move to their difference preferences of flow between plants and decor.
Food can be pretty much anything, but I have found shrimps are particularly fond of mulberry leaves, aramanth and algae wafers as well as frozen food which as cyclops but feed them these sparingly, almost as a treat every once in awhile as too much of any of the above will provide too much protein etc which is not good for their health.
A source of calcium if you have particularly soft water is a good idea as this helps their shell growth and for moulting.
Water changes once a week at around 20 - 30% should be adequate.
And to answer your question of whether to use tank water from your 20 gal, nope, won’t do a thing for your new tank at all really, basically is just pooped dirty water and adding that to a new tank is not going to help anything. Chlorinated fresh water is best and so be absolutely sure you have cycled this tank before adding any shrimps, this is of utmost importance imho.
Oh, and adding fish from your 20 gal to the 5 gal for cycling is not the best idea, very few fish, are suitable for a 5 gal tank so this would only stress out the poor fish and putting them through a cycling process is not a nice thing to do.
The addition of mature filter media for fishless cycling is best thing to do along with testing water and addition of ammonia to test at appropriate times is truly best method.