I think the first thing I would do is remove whatever is on the window frame, it looks like painters tape that has been left on too long. Use a UPVC cleaner to clean the window frame. I would then use HG Mould spray, you can get this on Amazon and it will remove any black mould that might be lurking in the gaps, ventilate the room well and read the instructions.
Rake out any loose plaster from the side of the wall and anything in those gaps. You can buy some good ready to go filler or mix up your own from powder form, get the wall filled and the gaps. You do not want to caulk large gaps.
Buy a Fugi tool like this one https://www.amazon.co.uk/Fugi-Professional-Grouting-Silicone-Profiling/dp/B00NA2PD3E which will make your caulk look professionally done, watch these videos by the brilliant Charlie on how to do silicone and corners. Same technique applies to caulk. If this is your first time, either use some scrap wood to practise or just use the tool to remove any caulk you are not happy with.
How to use the Fugi
How to do corners with an upright
For the sill itself, light sand, undercoat/primer and then top coat. I have just seen you are a beginner, Instagram https://www.instagram.com/charlottedecorator/ I have been decorating my own homes for 30 years, she is really good. For DIY/handy stuff, Charlie DIYte, Gosforth Handyman, Proper DIY, The DIY Guy, Ultimate Handyman, How2D2 and Pouse Around the House. I am very capable at DIY with Dh, we instal our own bathrooms, tile, fit flooring etc but I still watch a lot of how to videos.