You can work some wood glue down into the cracks. Put a little bit of glue over the crack and rub your finger back and forth using a little bit of pressure. Then stay off of it until the glue dries.
Use nails or screws, but be sure there are no pipes under where you wish to fix the boards down as you may puncture them.
here are ideas/videos https://www.youtube.com/results?search_query=diy+tighten+loose+floorboards
I think I would use the Squeak no More type screws that break off at the top so they don't show, and screw the boards down on the floor joists.... use a drill to find where they are.... https://www.youtube.com/watch?v=3iAseVZZKlY&t=8s