If milk is out for the 4 hours after being pumped, can it then be refrigerated or frozen?

Me

If milk is out for the 4 hours after being pumped, can it then be refrigerated for 4 days or frozen for 6 months? Or do I need to toss it after 4 hours out at room temperature?

I’m starting to get more supply than he needs and can store 2oz, but some of the milk in that 2oz was collected almost 4 hours ago.

If I do refrigerate or freeze it, when I take it out, how long is it good for? 2 hours?

Thanks!