The best way to prevent your no-bake cookies from falling apart is by using the type of oats called for in the recipe and boiling the butter, milk, and sugar mixture for the amount of time recommended in the recipe.