nRF24 wireless

I'm thinking about making an remote control boat and using an Arduino uno and a mega to control the boat. My concern is range and I'm not sure how to code for it. Sorry if this is too vague.
Let's start with I want to control 2 motors with 2 buttons on the other board

Yes, it is too vague. You should never start coding without clear requirements. Even if it's an experiment you should know what you're testing.

There is nothing vague about range - but I don't know the answer. 2.4GHz is widely used for radio control so there is not theoretical objection.

If you are new to Arduinos I suggest you first get your 2 buttons and 2 motors working on a single Arduino. Then get them working on the two Arduinos connected with wires. Then introduce the wireless connection.

And do some simple demo programs with the wireless devices before trying your real project.

...R

Thank you for the advice I appreciate it