Garden compost is usually the wrong material for pots on its own. It compacts, holds too much water, and may carry fungus gnats indoors. Use it as up to a third of a mix, not as the mix. Below: how much compost for houseplants to use, when to apply it, and where it does more harm than good.
Compost for houseplants: spread on the surface and let worms take it down.
Why neat compost fails in a pot
A container has no drainage profile and no worms. Compost that behaves beautifully in a bed slumps into a dense, waterlogged mass in a pot, and roots suffocate.
A workable mix
Roughly one third sieved compost, two thirds a free-draining potting medium, plus perlite or coarse grit for anything that resents wet feet.
Fungus gnats
Garden compost frequently brings them indoors. Sieving and a period of drying reduces the risk; a top layer of grit discourages egg-laying.
Worm castings are the exception. Fine, stable and genuinely well suited to containers, but still as an amendment at 10-20%, not as the whole medium.