You can do it in many ways:
Example:
1-By Tiles, setting them as occupied after you spawn a cannon on them. For this, you can use normal Sprite tiles or Tilemaps Tiles.
2-By Arrays, you can mark the cells that the cannon is in as occupied by setting the XY to 1
etc...
Here is one way by using the Tilemaps method:
https://www.dropbox.com/scl/fi/wgenu56j26m4xypy6bty2/Spawn-Objects-on-Neighbor-Tiles.capx?rlkey=p4qg99f2ef9a2xh5qsoprjaen&dl=0
Note:
This always follows the same pattern, checks first at his right and then does a clockwise 360-degree check for all the other tiles.
======================================================
If you want them to spawn at Random Tile then you need to change a bit the code.
Here is one example:
https://www.dropbox.com/scl/fi/40t4wvg3ktnbbz2a18h5a/Spawn-Objects-on-Neighbor-Tiles2.capx?rlkey=etdkbql8xjwhw449e1qga6xhb&dl=0