How Can I list a list of various memory occupied by the program during compilation while using Keil Studio Cloud

How Can I list a list of various memory occupied by the program during compilation while using Keil Studio Cloud, just like Mbed Studio?

Its not clear what you mean, but Mbed has some built in memory statistics and trace, check the API documentation:
https://os.mbed.com/docs/mbed-os/v6.16/apis/mbed-statistics.html
https://os.mbed.com/docs/mbed-os/v6.16/apis/memory-apis.html

What I mean is to prompt for the size of various memory segments during compilation, such as. data or. text

ok, this statistics is generated by some python code from the generated .elf file. I haven’t used the online compilers for some time, I don’t know if that is still included.
The python script for analyzing the .elf file could be used also offline, and there are other tools to read and show the number of bytes per segment.