try https://your-nextcloud.domain/ocs/v2.php/apps/serverinfo/api/v1/info that should give you the required information (do change the value your-nextcloud.domain)
Infos to the Operating System (eg. Debian, Ubuntu) and its version (eg Trixie or Noble Numbat) you shall get with none of the suggested solutions and that is pretty good so.
Potential North Korean Hackers shall not get such infos such easy!