These are questions of deep history, and as such, they rest almost entirely on speculative hypotheses made in response to a paucity of data.
What is the earliest record we have of music-making? Perhaps it is the Divje Babe bone flute found in Slovinia and thought to be 45,000 years old. Dancing is not my speciality (and I apologize to the mods for not having the best sources here), but from what I can gather, our earliest evidence of dancing is a depiction on the Rock Shelters of Bhimbetka some 9,000 years ago.
So that should be an open and shut case! We have earlier evidence of musical instruments than we do of dancing, so we should be able to say that music making is roughly 36,000 years older than dancing. Right?
Well, hopefully you can see that that's obviously not a sound conclusion. The first and perhaps most obvious problem is that music making has the potential to leave artifacts in a way that dance does not. Which is to say, that materials like bone, which are useful to make flutes from, can last a REALLY long time. But what kind of artifacts would dancing leave? Or indeed, how long before the bone flutes were people using wooden flutes, or druming on a bit of leather tightly fastened to a wooden resonator? None of these practices are going to leave substantial fossils. And even if they did, humans are perfectly capable of making music and dancing using nothing but their own bodies. Even if we had access to every single physical artifact that survives somewhere in this earth today, there would still be eons of dancing and music making that did not make use of physical tools, and hence will forever remain unknown to us.
All that is to say that, while archeology is a good way to establish the latest date that something had to have happened, it doesn't really help us establish the earliest date that something could have happened.
But what we do know is that anatomically modern humans are capable, from a very early age, of doing musical and dance related activities, especially of "entraining," or matching their movements to the repetitive patternings of a stimulus. This suggests that the capacity to dance and to make music are likely extremely basic to the human experience, perhaps dating back more than 100,000 years. Gary Tomlinson, in both his A Million Years of Music and Culture and the Course of Human Evolution, hypothesizes a dense web of cognitive pre-requisites for engaging in activities such as dancing and making music. Dancing or singing humans have to be able to think hierarchically, for instance. They have to have the capacity for what Tomasello calls shared intentionality, which is the ability to coordinate with another being in pursuit of common goals. They must likewise be able to see a gesture and understand what it is signifying (i.e., the directionality of "pointing"). And so on, and so forth. Moreover, precisely these same cognitive capacities are also needed for human beings to have things like language.
Whether we danced or sang first is perhaps the fundamental "chicken and egg" dilemma for all deep histories of human artistry. I say dilemma, but perhaps it is not really a dilemma at all. Because it is clear that dancing and making music are fundamentally linked in a lot of human experience, and that the things one has to be able to do in order to dance is almost identical with the things one has to do in order to make music. In the last analysis, it is perhaps the most plausible to suspect that the two activities grew up alongside and influenced one another. That non-dancing and non-music jointly yielded to quasi-dancing and quasi-music, which in turn became proto-dancing and proto-music, which then jointly became nearly-dancing and nearly-music, and finally dancing and music together. Perhaps, then, there is no first.
The earliest human music and dance is lost in prehistory. However, there is one significant clue that suggests that dance may well predate humans: chimpanzees, both wild and in captivity, display rhythmic movement - behaviour that can be interpreted as dancing (Hattori and Tomonaga, 2020). Behaviour like this occurs in response to both rhythmic and arrhythmic sounds: music, rain, etc.
Human infants also show rhythmic movement in response to music and rhythmic sound (Fujii et al., 2014; Zentner and Eerola, 2014). They differ from chimpanzees in that they show a much weaker response to non-rhythmic sound (but will sometimes respond with rhythmic motion of short duration).
That we see such similar "dancing" in humans who (we assume) are too young to have learned to dance and chimpanzees strongly suggests that this is innate behaviour that was probably already present in the last common ancestor of chimpanzees and humans. That is, it appears that our ancestors have been dancing for at least 6 million years. That is, if this rhythmic movement is "dancing".
Whether or not singing predates dancing remains unknown, since Chimpanzees will vocalise in response to sounds. If we consider this "singing", and consider singing to be music, then both music and dancing appear to be at least 6 million years old. If we don't consider such vocalisation to be singing and/or music, then dancing came first. If we restrict music to sounds produced by musical instruments other than voice, then dance is older. In particular, the chimpanzee response to non-rhythmic sounds suggests that music is not a prerequisite for dancing, and dancing can have developed long before music.
Some examples of chimpanzee "dancing":
Wild chimpanzees "dancing" to a waterfall: https://www.youtube.com/watch?v=jjQCZClpaaY
Chimpanzee "rain dance": https://www.youtube.com/watch?v=JERlIC3_IT0
Hattori and Tomonaga (2020) give more examples in their paper.
References:
Fujii S, Watanabe H, Oohashi H, Hirashima M, Nozaki D, Taga G, "Precursors of Dancing and Singing to Music in Three- to Four-Months-Old Infants", PLoS ONE 9(5): e97680 (2014). https://doi.org/10.1371/journal.pone.0097680 [See refs 1-3 in this paper for more on the antiquity of musical instruments and singing.]
Yuko Hattori, Masaki Tomonaga, "Rhythmic swaying induced by sound in chimpanzees (Pan troglodytes)", Proceedings of the National Academy of Sciences 117(2), 936-942 (2020); DOI: 10.1073/pnas.1910318116 https://www.pnas.org/content/117/2/936
Marcel Zentner, Tuomas Eerola, "Rhythmic engagement with music in infancy", Proceedings of the National Academy of Sciences 107(13), 5768-5773 (2010); DOI: 10.1073/pnas.1000121107 https://www.pnas.org/content/107/13/5768