the sound on the device workks with headphones but the bulit in speaker won’t work. can anyone help?

Go to Settings > Audio > Speaker

Make sure that ‘Automatic’ is selected, not ‘OFF’

With automatic, the speaker will turn on when the headphones are not plugged in.

If it still doesn’t work, then there is a hardware problem and you will need to return for an exchange.