There are many substitutes but none of them are very good. It’s best to just leave it out or opt for cheese-free dishes.

For a soy ricotta cheese, pulse together in a food processor:
1 cup firm tofu, 1 cup soft tofu, 1 tsp fresh lemon juice, 1 tsp maple syrup and a dash of salt.

For tofu feta, combine:
1 cup cubed or crumbled firm or extra firm tofu, 1 Tbsp fresh lemon juice, 1 Tbsp olive oil, 1 tsp oregano, salt and pepper to taste