Both devices comes with 128GB & 256GB Storage version and runs on 8GB RAM.
Galaxy S24 has 12MP front camera while Pixel has 10.5 MP. Both have 50MP rear camera. Galaxy has additional 12MP and Pixel has 13MP on the back with main camera.
In short both devices are alike in terms of performance, camera, battery life, while Pixel 8 lacks Fast charging.