A phone that will not charge is almost never the board. It is the chain from the wall to the battery, and the chain has four links. Work them cheapest first.
Link one: the wall. Try a different outlet, preferably a different circuit. Then the charger itself. Ideally try a known-good charger of the right wattage, because chargers die quietly and taking the blame for them is the most common mistake in this repair.
Link two: the cable. Cables wear at the strain relief and at the connector shell. Swap in a cable that charges something else right now.
Link three: the port. Shine a light inside and look. Pocket lint packed against the contacts is the single most common cause of "it only charges at this angle." A wooden toothpick, no metal, can lift it out in seconds. Clean the contacts gently, never scrape.
Link four: the battery and the charging circuit. A swollen back or a screen lifting at one edge is a stop now situation, not a keep-using-it situation. A phone that charges only while off, or reports charging but never gains, may be the battery or the charge IC, and that is board-level work.
Where did your phone fall out of the chain? Post the model and the link that caught it.