In the ending credits of Captain Marvel Goose is hacking up what appears to be a hairball. How did the animal handlers make the cat convulse and hack the way she did? Was this all CGI?
(See high definition video here:)
As mentioned by the VFX technician involved in Captain Marvel, Chris Townsend in his interview with the Huffington Post:
There are about over 100 shots of the cat in the film, 70 or 80 of them are CG. So convincing was the CGI that, [according to Townsend], even the movie's directors Anna Boden and Ryan Fleck couldn't tell the computer-generated cat from the real ones.
So, about 80% CG shots for the cat. This could very well include the tesseract scene.
Additionally, Townsend mentions that,
"Whenever Brie’s holding a cat, almost always it’s a CG cat, and a lot of the times when the cat is on Nick Fury’s lap or is wandering around, it’s CG as well.
Because Brie Larson is allergic to cats, and S.L. Jackson is not so fond of cats either.
"There’s a lot of stuff that I would look at as a viewer and think, ‘Well, surely they could’ve got a cat to do that.’ In reality, no, we couldn’t get the cat to perform correctly in the same takes we got the actors to perform"
Well, cats do convulse and spit hairballs quite frequently, it is not feasible to have a camera ready all the time simply to shoot a cat throwing up (MCU isn't that patient).
PS: Just a reminder; They actually CGI'd the gun in S.L.Jackson's hand in Spider-Man: Far From Home (see this tweet). This tells you how much the MCU uses CGI.