Are you familiar with the concepts of "early music" and "historically-informed performance"?
General background rather than a specific answer: I'm not a keyboardist or instrumentalist, but I work as a volunteer business person with a Baroque orchestra composed of career specialists in early music and historically-informed performance. All I can say is that the subject of how to correctly play ornaments and trills in Baroque and Classical music is a subject that's had an explosive amount of study done on it in recent decades.
Look for resources in "early music" and "historically-informed performance" (what we used to call "authentic performance practice" although that term has fallen out of favor), and by all means listen to recordings that you know to be made by early music specialists on period instruments (harpsichord and early fortepiano) and not by "modern-style" pianists playing on "modern" pianos.
The other element, of course, is that there is room for personal interpretation and a little improvisation in places when you perform these pieces. But how much liberty to take with the material is a subject of endless debate and must just come down to your musical knowledge and taste.