Hi @sns ,
In SharePoint, AD group is different from SharePoint group. AD group is seen as a normal user in SharePoint.
As a workaround, you could create a SharePoint group and add an AD group inside of the SharePoint group. This way, if you need to add additional users to your site in addition to those that already exist in AD group, you can add them easily by adding individual users to the SharePoint group, alongside the AD group. active-directory-groups-sharepoint-groups
Below is powerShell to add user to a SharePoint group:
New-SPUser -UserAlias "domain\user" -Web "http://sharepoint.crescent.com/sites/marketing" -Group "Marketing Owners"
Reference: add-user-to-sharepoint-group-with-powershell
Besides, for the error when you post new question. I think you may have some codes in your question, you could use txt file to upload your log/code. You'd better submit a feedback here using the tag qna-feedback : https://learn.microsoft.com/en-us/answers/topics/qna-feedback.html