You can set a static IP in the networking settings on your phone. Assuming you choose an IP that isn’t already assigned to something else on your network you should be fine. The router will usually remember that your phone has claimed that IP address and not assign it out when your phone is not there so you won’t run into conflicts with that.
I used this approach for many years until I ended up flashing dd-wrt on my router which let me set a static IP table in the router itself.