the phrase knock on the door usually uses knock as a verb. knocking on a door is using the knuckles of the hand to hit a door to get the attention of someone on the other side of the door. while the other phrase uses knock as a noun. A knock at the door is the sound that someone hears when another person hits a door with their knuckles.
it can also be interchangeable
hope it helps:)