SQL Server 2019 (15.x) Enterprise (Core License) will support more than 20 cores per SQL Server Instance.
You can check your installed Edition with the following
SELECT SERVERPROPERTY('Edition')
Note that without Core-based licensing you would be limited to 20 cores per SQL Server Instance.
Enterprise edition with Server + Client Access License (CAL) licensing is limited to 20 cores per SQL Server instance. (This licensing isn't available for new agreements.) There are no limits under the Core-based Server Licensing model.
Please consult with your licensing team to verify whether you have the correct licensing but you may have accidently installed the incorrect software edition. If you have Core-based licensing then you can follow the supported upgrade paths or perform a new install.
Supported Upgrade Paths