If your commits use the Changelog trailer, you can use that API endpoint to generate changelog. The POST endpoint will commit the changes to the changelog file automatically, while the GET one will allow you to fetch or preview the new changelog.
It shouldn’t be too hard, but I haven’t done that, so I’m not sure. Depends on your workflow.
I’d try just calling curl --request POST --header "PRIVATE-TOKEN: <token>" --data "version=<tag>" "https://gitlab.com/api/v4/projects/<your project id>/repository/changelog" in CI job triggered by new tag, I’d use tag name as a version (assuming here that your tags follow semver).