Copy and Pasting the important stuff since this seems to be what you are asking about.
Special rule for the first year you retireSometimes people who retire in mid-year already have earned more than the annual earnings limit. That’s why there is a special rule that applies to earnings for one year,
usually the first year of retirement.
Under this rule, you can get a full Social Security check for any whole month you’re retired, regardless of your yearly earnings. In 2020, a person younger than full retirement age for the entire year is considered retired if monthly earnings are $1,520 or less.