Thanks for query,
You have not mentioned your age.
If you are elderly then it may be due to osteoartherits of the knee.
Due to degeneration changes ligament and muscles become lax or due to less lubrication joint become dry causing crunchimg sound.
Go for physiotherapy
and light patellar exercise.
Ok and bye.