Running Out of RAM - Google Colab
I first deleted variables that would be re-initialized in the next iteration by calling "del"

If that variable is quickly reassigned to a new value, deleting it won't do anything.

I then read in the information/csv file after the for loop and obtained the information that way, instead of appending to a list every iteration in the for loop

If the end result is the same amount of information stored in variables, then this won't do anything either.
Without seeing your actual code, all I can say is "your variables are too big".
I've been trying to run a certain cell in Google Colab for a while now and keep running into the same issue. The cell runs for about 20-25 mins and terminates the code and restarts the runtime due to running out of memory/RAM, which causes all variables to be lost. I first deleted variables that would be re-initialized in the next iteration by calling "del". After deleting the variable I called the gc.collect() function. Once that didn't work, I noticed that there were some data structures that increased every iteration (a couple of lists). I removed the lists and wrote the information to a csv file instead. I then read in the information/csv file after the for loop and obtained the information that way, instead of appending to a list every iteration in the for loop. However, that didn't solve the issue either. I do not have Colab Pro+, I am utilizing the free version.
Any assistance would be greatly appreciated. Thanks!