After installing July or August 2024 CU for SharePoint Server 2016/2019 PowerShell operations to create new site collections using certain site templates and enabling specific features like Document Set and Video and Rich Media failed.
September 2024 CU includes a fix which resolves the issue: