I do agree, handwriting is just better for math and learning (at least for me)
But you _can_ write math/logic pretty seamlessly with the right tools. For example, with Typst (typst.app/play) you can write formulas like this:
$(a and not b) => (c xor d)$