You can test number of bits of time_t in the standard C library with sizeof(time_t).
The underlying type for time_t that has been used for compilation of the newlib (the C runtime library of the ARM toolchain, bundled with CubeIDE) is defined in newlib.h
#include <newlib-nano/newlib.h>
#ifndef _WANT_USE_LONG_TIME_T
// time_t likely is LONGLONG = 64 bit. this is default.
#else
// time_t likely is LONG (32 bit)
#endif
Usually located in [STM32CubeIDE]/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.xxxxxxxxxx/tools/arm-none-eabi/include/newlib-nano/newlib.h
You cannot redefine this size in your project with any macro or C option, as the library has already been built and available for you in object form.
If you want different number of bits for time, you can define any typedef and your own time functions.