Soft and shapeless stools can generally be treated by improving diet or taking drugs. Soft and shapeless stools are usually caused by ingesting digestible food or lactose intolerance. If you eat digestible food or fruits and vegetables with high cellulose content, you will have soft and shapeless stools, which is a normal symptom, so don't worry too much.
Eating crude fiber food as much as possible at ordinary times can effectively improve, but if you ingest dairy products because of lactose intolerance, it will also cause patients to have soft stools, so you should avoid ingesting dairy products and eat more other nutrients with high protein content.