Hey Linda,
Hopefully you’re not having that problem anymore. I recently stumbled upon the same thing with my google pixel two. I was wary over replacing the piece myself because I felt there was an alternate solution that would get the problem done, and I was right!
The easiest thing for you to do would be to grab a thin object, I used a zip tie, and dip it in alcohol, isopropyl is preferable, and just keep on trying to wedge out dirt from the charging port. I spent about 30 minutes on my phone and at first only tiny pieces came off, but as I kept on wedging even bigger pieces came out. Once I connected my charger into the charging port it actually went all the way inside! (only 3/4 of the charger fit). And now it’s working good as new, hopefully this makes your way and you can fix your phone!!