How do I implement GetGroupsAsync into my code?

I have tried to do GroupService | Roblox Creator Documentation but I really don’t understand. How would I use it it scan a whole group in my code.

My code:

-- Groups --

local NRB = 4734688               --NRB = Nighthawk Reaper Battalion--
local RC = 7581138                --RC = Red Cell--  --3880488--
local RCSF = 4236314              --RCSF = Red Cell Special Forces--
local RCSFP = 5306090            --RCSF:P = Red Cell Special Forces: Phantoms--
local RCT = 4924452               --RCT = Red Cell Templars--
local RCTC = 6920519             --Red Cell Templars: Chevaliers--


--Flags--
local Flag1 = "Player in NRB and RC"
local Flag2 = "Player also in RCSF"
local Flag3 = "Player also in RCSF:P"
local Flag4 = "Player also in RCT"
local Flag5 = "Player also in RCT:C"


--Checking Procces--
print("Scanning for corruptions in NRB. Please Stand by.")


--Main Code--
game.Players.PlayerAdded:Connect(function(Player)
	if Player:IsInGroup(NRB) and Player:IsInGroup(RC) then
		print("Detected Curruption.")
		print("Player: "..Player.Name.."Flagged. Reason: ", Flag1)
		if Player:IsInGroup(RCSF) then
			print("Player: "..Player.Name.."Flagged. Reason: ", Flag2)
		end
		if Player:IsInGroup(RCSFP) then
			print("Player: "..Player.Name.."Flagged. Reason: ", Flag3)
		end
		if Player:IsInGroup(RCT) then
			print("Player: "..Player.Name.."Flagged. Reason: ", Flag4)
		end
		if Player:IsInGroup(RCTC) then
			print("Player: "..Player.Name.."Flagged. Reason: ", Flag5)
		end
	else
		print("Scanned for curruptions. No one was flagged.")
	end
end)

I would greatly appreciate it if someone helped.

local groups = Groups:GetGroupsAsync(userId) - ensure to put in the player’s id in the parameters, returns an array (dictionary).

for _, informationFor in pairs(groups) do --runs through each group they're in
    print(informationFor.Name) --prints out group's name
end
local watchlist = { --cleaner table
	[4734688] = "NRB and RC";
	[7581138] = "RCSF";
	[4236314] = "RCSF:P";
	[5306090] = "RCT";
	[4924452] = "RCT:C"
}
game.Players.PlayerAdded:Connect(function(plr)
	local output = "Scanned for corruptions for "..plr.Name..", clear." --default, set if player's not in a listed group
	local groups = game:GetService("GroupService"):GetGroupsAsync(plr.UserId) --getting player's groups
	for _, group in pairs(groups) do --for each group
		for id, name in pairs(watchlist) do --for each watchlist (to get dictionary)
			if id == group.Id then --if watchlist's id matches with group's id then
				if output == "Scanned for corruptions for "..plr.Name..", clear." then output = "[FLAG:] "..plr.Name.." is in" end --clearing the default, editing it
				output = output.." ["..name.."]" --adding the group into the output
			end
		end
	end
	print(output) --such as "[FLAG:] Doqee is in [Group 1] [Group 2]"
end)