You will not be fired over this. Under Dutch law you have no obligation to tell anyone in the workplace, even if you are seeking specific accommodations. Many Dutch people speak about their afflictions quite openly, specifically because they feel quite protected.
I would advise against keeping the diagnosis private out of fear. If it becomes relevant, share it privately and on a need-to-know basis. The openness will buy you a lot of goodwill. If you're struggling with certain situations and interactions in the workplace, it is important that you schedule a one-on-one to bring those concerns to your manager and just inform them as part of that conversation. Be proactive and don't use it as an excuse when you receive feedback or criticism, that is not appreciated.
Were you recently diagnosed? If so, then this may be a rather turbulent time. I would recommend that you tell your manager, they'll understand that this has an impact on your mental health and self-confidence.
What if you want to keep it private?
Suppose you need some accommodations and want to keep the diagnosis private, then you should ask HR to be referred to an 'arbo-arts' (contracted doctor). You discuss your issues with this doctor, they consult another medical professional. Preferably whomever diagnosed or treated you, or is currently treating you. If that is not possible they will refer you for evaluation by a new doc. In the end, the 'arbo-arts' sends his (very general) recommendations to your HR departement. HR and your manager then work with you to figure out what works within that framework.
When should you be careful?
Though you cannot be fired for having autism, you can be fired* for not performing due to your autism. Suppose you accept a job in a customer-facing role, and have frequent conflicts with your customers because you don't notice when they are getting angry or sad. In that case, the expectation is that will reflect on these interactions and conclude that this is not the right job for you. I you fail to come to that conclusion yourself, then your boss will be forced to fire you eventually. Before that happens, you will typically work together to improve your performance.
*I mean both being fired outright and not having your contract extended. Firing someone is really hard in the Netherlands, but not extending their contract is easy.