This is an easy fix I found to fix the charging port on my Pixel 2. It uses USB-C, and it seems like these are notorious for getting dust, felt, and other debris lodged in them, making the charging contact more difficult. In my case, the debris was so thick that my charging cord would even pop itself out with no one touching it.