Kept getting this memory size error

I kept getting this memory size error and the memory_limit is set to 1024M

What am I doing wrong?

ERROR [2021-10-28 01:01:18] 3 Fatal error encountered: /home/-----------------/core/View.php(378): Allowed memory size of 33554432 bytes exhausted (tried to allocate 159744 bytes)
on /home/--------------------/core/View.php(378)
[Query: , CLI mode: 1]