I'm surprised they gave you a hard time as a Canadian Citizen. Maybe if you had travel as a PR, but even then, you went to Cuba, not to Hungary, so why do they care about your status before you became citizen? Sounds like shitty border agents to me who just wanted to annoy you.
With that being said, I'm in a similar boat to yours, and all I do when traveling back to my home country is just use my passport from there to enter as I have not renounced that citizenship and I am legally required to do so. When I come back to Canada, they don't care where I've been and I use my Canadian Passport. I would recommend going to the Hungary embassy/consulate and get that passport as well, since it looks that it will probably make your life easier when going to the EU, as you won't need to apply for an ETIAS when they start asking for them. However, if you're not going back to Hungary, it's not necessary.
With that being said, I'm in a similar boat to yours, and all I do when traveling back to my home country is just use my passport from there to enter as I have not renounced that citizenship and I am legally required to do so. When I come back to Canada, they don't care where I've been and I use my Canadian Passport. I would recommend going to the Hungary embassy/consulate and get that passport as well, since it looks that it will probably make your life easier when going to the EU, as you won't need to apply for an ETIAS when they start asking for them. However, if you're not going back to Hungary, it's not necessary.