Game uninstallation

I just tried to uninstall Call of duty Cold war to get more space for the new game, but when i did it just completely erased from my library and it tells me to “buy now” if i want to install it again, Is it because idk how blizzard app works or what have happend, has anyone else tried this? and how do i get it back?