The kernel doesn't know what groups are. It just knows group id's.
It isn't necessary to "create" a group for the kernel, you just assign a groupid (All this is also true of users).
Now, the full operating system (beyond the kernel) does care about groups and users. Typically these are translated back and forth between names (group, login) and id's by looking them up in /etc/group
and /etc/passwd
but other options are also available as listed in /etc/nssswitch.conf
; Ultimately the library calls (not syscalls) getpwent
(and other getpw*) and getgrent
(and getgr*) do the translation through whatever is configured to be the source of credentials.
So the reason you can only find shell commands to create users and groups is because that's the way it is done. There is no syscall, because the kernel doesn't keep track of that info.
(Technically, there are also GUI interfaces to create them, but that's not really different than the shell commands.)
Some uses of the Linux kernel (android) dynamically create users and groups. Again, this is managed by the user mode android supervisory system, not by the kernel.