Your speedo will read incorrectly if you go from 18 to 20 inch wheels.
However the aspect ratio of the tyre fitted to the larger wheels can be selected to try and match the rolling circumference of the original tyre/wheel setup.
https://www.oponeo.co.uk/advice-and-tips/tyre-size-calculator