1) All of the trills and mordents notated in this piece stylistically have to be played starting from the upper note. For example, if the trill is written on the G, start it from the A. Likewise if the trill is placed on the A, start it from the B flat (not from B because of the key signature of 2 flats). Your cadential trills could consist of 4 or 6 notes depending on the speed. For example, in the trill on the G, you could play A-G-A-G or A-G-A-G-A-G. Try to hold the first note of the trill a little longer and speed up later.
2) Use fingers 2-3 or 3-4 in the right hand for the trills. These fingers were traditionally used in playing ornaments with the right hand in Bach's time. For some people playing with 2-3 is easier than with 3-4. Try both versions and decide which one is more suitable for your finger technique.
3) Start the ornaments on the beat. Quite often people play the trills and mordents before the beat. In other words, they start the ornament before as un upbeat and finish it on the beat. This is not correct. The Baroque ornament should take some rhythmic value of the note on which it is placed. In order to achieve that be aware of the beat on which the ornament should be played and practice slowly.
4) Look at each cadence and mark additional ornaments. Note that it is stylistically perfectly acceptable to add suitable trills and mordents on important cadences. This is especially noticeable in the fugue. Here you can add an upper mordent at the end of each subject entrance. Sometimes you can experiment with the lower mordents, too. While performing the ornaments, try not to play the notes which are foreign to the current key, such as B flat major or F major.
Use these tips as you practice this piece and try to re-create the authentic ornaments. Remember that ornamentation is also a part of performance practice, so if you want your playing to sound like in Bach's time, pay careful attention to the trills and mordents, practice them in a slow tempo first until you master them.
By the way, do you want to learn my special powerful techniques which help me to master any piece of organ music up to 10 times faster? If so, download my FREE Organ Practice Guide.
Or if you really want to develop unbeatable sight-reading skills, check out my systematic master course in Organ Sight-Reading.