(...Continued)
Since all the motherboards on the market are used, obviously you can't be 100% sure that every function is going to work correctly, but the reputable sellers will have tested the boards they sell to weed out the ones with issues. The ones sold on AliExpress, for example are generally tested and should have a guarantee of functionality. There are also reputable online stores that sell the parts as well; go through some of the answers forums to get an idea of which companies get recommendations.
eBay can be a good source to save money, but it's definitely a buyer beware situation, depending on the seller. You'll want to verify the IMEI number on an IMEI checking website to make sure the Find My iPhone function is turned off, that it's not iCloud locked and that it's not SIM locked. In general, the boards are pretty reliable so in most cases if it powers up at all, it will usually work.
So it's like buying anything used; you want to find a reputable seller who will guarantee their product.