Ihoujin wrote: You can edit the address with nmcli. I did something similar with my two Pi setups that each wanted to use 10.42.0.1 for their hotspots.
<code>nmcli connection modify <Hotspot> ipv4.address <XX.XX.X.X/24>
nmcli connection up Hotspot</code>

For my case, My Hotspot SSID/Connection name was AdventurePi (named after its use on a Star Adventurer.) So the command above with my details looked like this.
<code>nmcli connection modify AdventurePi IPv4.address 10.42.1.1/24
nmcli connection up AdventurePi </code>

References:

It now creates a hotspot with an IP address on 10.42.1.1 that will not conflict with the other system with an address at 10.42.0.1

References:
NetworkManager documentation
NetworkManager ManPages
Gnome Help Page

So I tried out nmcli, as you suggested, but without direct success. I think that the commands you quoted were related to Ubuntu, and the RPi OS doesn’t seem to have the same ones. I searched the nmcli help and I guess I could have pursued the issue by carrying on, however in the meantime I have found a different approach which seems to be working. I right click on the WiFi symbol in the taskbar, and select ‘edit connections’. Then select the Hotspot and click on the Cog symbol. Open the Tab ‘IPv4 Settings’ and in the box ‘Address (Optional)’ box click ‘Add’ and insert the new address e.g. 10.42.1.1 and the Netmask 24. Then click on Save, and reboot. The system boots up with the Hotspot IP address that I inserted.

Read More...