The command you have to use is not
comm -23 a.txt b.txt
comm outputs 3 columns: left-only , right-only , both. The
-3 switches suppress these columns.
-23 hides the right-only and both columns, showing the lines that appear only in the first (left) file.
If you want to find lines that appear in both, you can use
-12, which hides the left-only and right-only columns, leaving you with just the both column.