Facebook stores a master copy with the long edge capped at 2048 px, re-encoded as JPEG. Anything larger is scaled down on their side. PNG uploads are converted to JPEG too (the old trick of uploading a small PNG to avoid compression no longer works), and the EXIF data is removed.
To keep photos sharp: resize to the size Facebook will display (1080 px wide for feed posts is the practical limit on phones), sharpen after the resize, and turn on Upload HD in the app under Settings & privacy › Settings › Media. The presets on this page handle the first two.