You need to have the Ardunio ground connected to the L298N board ground for the Ardunio data signals (to the L298N board) to make sense. There needs to be a “closed loop path” for the signals.
All of the Arduino board ground pins are connected together internally, so one or more of them can be used in any combination. But a ground from the L298N board needs to connect to one of the Arduino ground pins.
We have a similar introduction project using the NRF24L01 radios. They use too much power to be reliable when powered from the Arduino 3.3Volt line. Instead, we added 3.3V regulator powered from the Arduino 5V line.
Powering the motor from a 9V battery may not work well, depending on the motor. Our “CARBOT” runs from 9 volts as well, but in the form of 6 AA batteries, instead of a single 9V battery. Of course, we are driving 2 motors instead of one, to give 2 wheel tank style “skid” steering, instead of using the servo. The single front wheel is just a caster.
Is that white wire from the L298N board to Arduino Vin intended to power the Arduino? If so, that needs to come from the 12V connection (which is really 9V). It would also be another reason to need to connect the ground. The 5V terminal is to be used if the L298N is “getting” power from that line. It is not a 5V output. At least not for the L298 boards I am familiar with. We use a motor shield, so that part of the wiring is simpler.
I did not check the connections for the NRF24L01 radios, some of which could depend on the software being used.