There are a lot of ways to end up with an undersized wire, which can lead to excess heat, which can melt the wire jacket, which can cause a short, which can cause a fire. Another leading cause of boat fires is lack of understanding of the explosivity of gasoline vapors and understanding of where to use ignition-protected devices. I am currently rewiring an ENTIRE boat, direct from the builder, because there were dozens of violations that all added up to that boat being a literal explosion waiting to happen.
I use the Blue Seas app on my phone regularly when I'm designing or wiring a boat. This app will tell you whether the ampacity of the wire or the voltage drop along the wire is the limiting factor. Most often, wire sizes have to go up due to voltage drop. Especially on circuits feeding electronics, you want to limit voltage drop to 3% or less, and that's even more critical when the house batteries are AGM or lead acid, because the voltage of these batteries may drop down substantially as they are discharged, whereas lithium batteries supply near constant voltage around 12.8 volts throughout their discharge cycle.
If you push the envelope and use a smaller wire than recommended, right there you risk a fire on your boat, period. Pay attention to how many wires are in a bundle, because it DOES matter. I often use the "7 to 24" wires in a bundle because often the wire runs through the main wire bundle on the boat. Also, the duration of the load - for instance a bilge pump should use a duration of a few to several hours if you really want it to be able to bail you out and get back to safe harbor.
Finally, a really little known problem, one of the few things that I don't recall reading about in Nigel Calder's book: The temperature rating of the device you're connecting to. Take for instance a very common Blue Sea A-series breaker. Look at the specs, and it will say "maximum operating temperature 85C". If you're using wire that is rated to 105C, and connecting that wire to this breaker that is rated to 85C, you must use the lower value to size that wire. In the Blue Sea app, you'd select 80C. Otherwise, you'll overheat the connection point at the breaker, which is typically in a congested area where you cannot afford to have an overheated device.
Another problem that catches people is the ampere interrupting capacity (AIC) rating of the breaker or fuse. If you use a device with an AIC rating that is too low for the power source that powers that wire, in a fault scenario, power could arc across the points of the breaker and literally weld the breaker shut, and now you have no circuit protection and you'll likely melt down the wire, causing a fire. Same with fuses. Read up about this in Nigel Calder's book, especially if you have lithium batteries!!
The physical act of wiring a boat is approachable to everyone with some care. Sizing wires and specifying circuit protection is a further stretch that requires focused study, an attitude of curiosity, and training/mentoring. Luckily, basically all the answers are in Nigel's book, and further explanations are available online, for instance some of the excellent material available at Pacific Yacht Systems.