How to properly add/remove flag (Flagged field) to/from an issue using rest api?

I just tested against a live Jira Cloud instance, and the Flagged field came back as a single checkbox, not a multi checkbox, so I don’t where you are getting your source of information of it being a multi checkbox.

I then tried changing an Issue’s Flagged field’s value to ‘Impediment’, exactly as described in the Stack Overflow and Atlassian Community articles, by submitting a request to the Edit issue endpoint.

PUT https://{{Instance}}/rest/api/3/issue/{{issueKey}}

{
    "fields": {
        "customfield_10021":[ {"value": "Impediment" }]
	}
}

… and it worked perfectly, and that issue was then flagged:

Everything seems to be working perfectly for me, exactly as per the documentation, so I don’t think I can help you much further.

Good luck.