Accidentally deleted photos from phone and iCloud
So I thought that if I deleted photos from my phone I would still have them on my iCloud but it also deleted them from my iCloud, how do I get them back? and why are my phone and iCloud linked that way. Pls help, I have memories in those photos and videos. The only pictures on my iCloud are the ones on my phone.