How to stop player taking over the foward axis after initiating a interaction

How are you doing it? Are we talking about Enhanced Input? Or the now deprecated legacy system?