My lenovo Ideapad 310-15ISK was working fine at first but after a while it started having problems charging when running programs which used NVIDIA graphics card instead of the Intel one, originally it came with a 65W AC adapter, but I've heard it could run better with a 90W one, can I substitute one with another is all the other stats are the same?(e.g output/input voltage)
Yes if both adapters are for your general Lenovo model then it's fine. I swap between 60 and 90 and even 120 watt models with T and W Lenovos without issues. Of course on the W models the weaker power adapters don't work well, but other way around it's fine.
Check the output voltage, that's the most important factor. You can find those on the back of your adapter, if they are same, you can use it.
I wouldn't recommend it if your option. There is no advantage in using a higher wattage charger than the rated one, but it could sometimes lead to unfortunate consequences.