just replace the code in void Start() with this code
m_InputField.onEndEdit.AddListener(OnSubmit);
or follow the video Q Inventory System fix