Hi @jabitbe2_jcplc
If you don't need ECC, you can disable ECC to have more SRAM used for ECC as regular SRAM, which will increase the available memory.
All SRAM blocks (except RAMA) ECC bits are located in .SRAMG and SRAMH. But if you disable ECC, they free up for general use. see below extracted from RM:

To do it, we need to configure SYSCON_ECC_ENABLE_CTRL register. Note that ECC is enabled by default for RAMB and RAMX on ECC-supported parts, but you can turn it off via this register.

Just make sure to follow the specified sequence when setting the register bits to avoid issues. see below I extracted from RM

For more, see MCXNx4xRM, chapter 4 Memory.
Hope this will help you.
Jun Zhang