If I eat a whole pizza, will I gain weight instantly?

I heard that eating a whole pizza can make you gain weight immediately. Is this true? How does the science work? Answer me pls OP im curious...