Cup measurements: shake or scrape?
I suggest to measure by weight as you'll never go wrong.

Otherwise, I use your second method which is to scoop then use a knifed to rid of excess flour.

Flour is so fluffy and needs to be compacted (somewhat) to get a true cup, therefore measuring by weight always guarantees the same amount of flour.