Clean the shrimp thoroughly.
Finely chop the onion and garlic.
Heat olive oil in a pan and sauté the garlic and onion.
Add the shrimp and cook until done.
Add the soft tofu and gently break it up over low heat.
Pour in milk and heavy cream, and mix well.
Season with salt and pepper.
Transfer to a gratin dish and sprinkle mozzarella cheese on top.
Bake in the oven or air fryer until the cheese is golden brown.