If you are new to source generators and want to experiment with its possibilities, I can recommend the Source Generator Playground.
This Blazor app gives you a simple console application and a source generator and allows you to observe the generated output. You can try it out live here: https://wengier.com/SourceGeneratorPlayground
They are some sample generators available that you can start modifying to see what happens:
This is a great way to learn what is possible.