I insert keyframe at 1 and at 20.

I want to insert keyframes at each frames from 1 to 20
how to insert keyframe to all frames?
Select your object, go into the header menu > Object > Animation > Bake Action. In the pop-up panel choose End Frame > 20 and click OK.
If you want to bake keyframes for a track or several tracks only, select them in the Dope Sheet and Key > Bake Keyframes or ShiftAltO (not available in the Graph Editor but you can still use the shortcut):