“Repairing” a water damaged iPhone, especially a dual layer logic board design such as the XS series, is fraught with issues. If this is your own device, thats one thing but if you are fixing this for someone else, you could be in for a world of “warranty” issues. In my experience, unless the liquid damage is very localized in a non-critical area, you are bound to have a one or more latent issues develop over time. Some water damaged phones are easy to recover but others…not so much. Only you have to decide when to cut bait.
At any rate, it sounds like a screen issue as all of the touch related logic is on the screen. The only exception would be some corrosion or damage to the screen connector but you would probably see other issues as well.