Presuming you've checked similar questions and they didn't solve the problem. Check if your system clock is correct and in the right timezone - SSL will fail if the clock is incorrect.
Similar questions:
Composer is not install in Windows 11 and PHP 8.2.12
Can't install Composer, error in install already try several solutions