Open the machine door
Enter password (default: 000000)
Select the menu item Payment Setting
Open the submenu Accept Limit
In the Max. Credit field, set the max value you want
Options: 5 €, 10 €, 20 €, 50 € or 100 €
Confirm with Enter

Only accept banknotes that fit the price range of your products.
For cheap items (e.g. snacks < 5 €), 5 € or 10 € make sense.
For high-priced products, 20 € or 50 € can also be enabled.
Make sure the machine always has enough change in the coin changer.
If the machine still accepts 50 € notes even after configuration, it's due to the firmware of the bill acceptor (e.g. NV9+).
In that case, the device needs to be flashed with different firmware or reconfigured using the ITL tool.
You can find more info from the manufacturer Innovative Technology (ITL): Official ITL website & support
With these settings you're making sure your machine only takes the bills you want and you avoid change problems.