Problem is, when I push the button 1 the LED flashes just for a second, same when pushing button 2. In the YT video the LED stay on until the other button for off is pushed.
Is it possible the code doesn't work properly on a Nano?
I've got a "real" Nano, not a clone.
Maybe the problem comes from the App I use on my mobile to controll the buttons?
I don't know how to post the code of app inventor. I only could show a screen shot.
But I guess this is a wrong topic here
Code for Nano and UNO would be identical, so what it does on one would be the same on the other.
To what "button" are you referring? This appears to be reading from the keyboard on the serial monitor, where you generally have to press "Enter" to get a response.
Seems like you have a problem that is kinda bigger than you thought...
How the information is transmitted from your mobile to the Nano?
Nano doesn´t have bluetooth/wi-fi capabilities unless you have a module to do so. Moreover, as @Paul_B stated, the code that you´ve provided is not prepared to receive information from your mobile, just from your keyboard.
Nothing in your code or description suggested a mobile phone or MIT app inventor. Your code works with the serial monitor, which is what the code you presented would appear to be for.
Please read How to get the best out of this forum and provide full information. You cannot expect helpful responses when the people trying to help you don't know what you actually have.
Maybe post the link to the youtube video so we can see what this is about. But I agree with the answers given above, that code will only work when the Arduino is connected to the computer via USB cable and the serial monitor is used to send the commands.