l298n motor driver problem

You don't seem to be following the pinout off the board AFAICT - this page describes the connector pinout I believe:

https://docs.google.com/file/d/19LBaH3h57KyCs4gJHbFO8N52dW69uNbLGxyYgZDiUcoSfKht7pkElL8cjqx1/edit?hl=en_US&pli=1

Or do you mean another board?