i know when i say 'у меня пища' it means ' i have food'
and when i say 'я имею пища' does it mean ' i have food' or 'i am having food'.

what if i said 'у меня было пища', this means 'i had food.'
and if i said 'я имел пища', it also means i had food.

i know when i use the preposition 'y', it can mean i have or had an object..
does 'иметь' refer to having the activity?

i am not sure
how is the word 'иметь' versus the preposition 'y' used?