I know how to say sorry and thank you, but what if I want to be more specific… what if I wanted to say “sorry for eating your candy” or “thanks for the present”?
These are random examples, I just want to figure out how the grammar works
For sorry, you can conjugate a verb in て form then add すみません. So "sorry for eating your candy" would be お菓子を食べてすみません. As for thank you, you can put Noun + を + ありがとう(ございます) so "thank you for the present" can be プレゼントをありがとう.
Yes exactly, て is making an action a gerund which we can then apologize for using すみません. If you want to be less formal you might consider using ごめん or すまんない.
Jumping in to say that the ~しまう is especially useful for expressing your regret/remorse lol
example: お菓子食べちゃってごめん!
Speaking of expressing gratitude/apology, I also think it's good to know that てもらっちゃって is often used when the speaker is apologetic and grateful at the same time, like "is it ok for someone like me to receive this, sorry to trouble you"
ごめんね、遠いのに送ってもらっちゃって… (Sorry you walked/drove me home when it's so far/thank you for doing that)
いろいろ聞いてもらっちゃって、すみません。(Sorry for asking you so many questions/thank you for letting me ask)
えぇ!!いいの?こんなに高価なものをもらっちゃって…大切にするね。ありがとう!(Here the speaker feels apologetic/surprised for receiving something so expensive, like is it okay to receive this..??! thank you T_T)