Yes to keep the onions from spoiling and to keep the onions fresh after cutting the onions up you should always refrigerate the unused cut up onions.
After you cut the onions up you should store the cut up onions in a sealed container and place then in the refrigerator.
When you keep the cut up onions in a sealed container and keep the cut up onions refrigerated they will last up to a week.
After a week the cut up onions will begin to go bad and should be thrown out.
But the onions will be good cut up in the refrigerator for 7 days.