When planning upgrades for SCCM (System Center Configuration Manager) and Windows Server OS, it is generally recommended to upgrade the SCCM first before upgrading the underlying Windows Server OS. This is because the SCCM upgrade may include new features and enhancements that are optimized for the latest Windows Server versions. Additionally, upgrading SCCM first ensures that you have the latest management capabilities and compatibility with the new OS features.
In your case, since you are currently on SCCM version 2303 and considering upgrades to 2309 or 2403, it would be prudent to first upgrade SCCM to the latest version available (either 2309 or 2403) before proceeding with the Windows Server OS upgrade from 2019 to a newer version. This approach minimizes potential compatibility issues and ensures a smoother transition for your infrastructure.
Make sure to review the specific requirements and compatibility notes for both the SCCM and Windows Server versions you are targeting to ensure a successful upgrade process.