I donโt know about the particular rules in place in Denmark or Hungary, and Iโm neither a lawyer nor an accountant, so take this with a fistful of salt.
Short answer: you canโt.
Registering as self-employed follows from being liable for tax on your self-employed income, not the other way around.
That is, youโll need to register as self-employed in order to file your taxes, but being registered as self-employed in a particular country doesnโt affect whether you are liable for taxes anywhere else. In fact, in most countries you are technically liable for tax on any self-employed income earnt while physically present there.
As a self-employed EU citizen travelling within the EU though, the general rule is that youโre ok to only pay taxes (and therefore register your self-employment) in the country where you are considered tax resident.
If you spend more than half the year in one particular country then youโll be tax resident there, otherwise your tax residence defaults to your home country. So if you want to register as self-employed and pay tax in a new EU country, youโll need to live there more than half the year.
In practice itโs more complicated than this, and often youโll need to continue filing tax returns long after you stop being tax resident somewhere.
It is possible to lose your home tax residency status without becoming resident in another EU country, but this leaves you in a legally questionable situation if you are self-employed, since you will still be officially liable for tax wherever you are working, but you wonโt get any โcreditโ for already paying that tax in your country of residence.
What you might want to do instead is set up and work through a personal company rather than being self-employed. This puts you in a better legal situation, since in most countries you are not liable for tax on foreign income if you are not a tax resident there, and this usually includes wages and dividends from companies registered outside the country, but not self-employed income earnt there.
So, if you managed to lose your home tax residency and set up a company in a third country (instead of being purely self-employed), you could travel as much as you like without having register for tax in either your home country or wherever you are working from, as long as you avoid staying in any one place long enough to become tax resident there. You could then pursue residency of a country where you do want to pay tax, at which point everything would be (mostly) above board.
But the rules about this are complicated, and vary a lot from country to country, so you should really talk to a professional about it.