Try going into your steam controller settings for stardew valley and selecting "Enable Steam Input". If that doesn't work, then try resetting to the default gamepad controller configuration by pressing shift + tab while in game to open the steam overlay, then selecting the controller configuration from the top right, then choosing "browse configs", and then finally selecting the recommended/default config.