JSFiddle - React, Tailwind, and code Playground

HTML

<label class="radio-inline" for="adType">
                                                    <input id = "privat"
                                                         name = "adType"
                                                        value = "0"
                                                        
                                                         type = "radio">
                                                    Privat </label>

                                                <label class="radio-inline" for="adType">
                                                    <input id = "gewerbe"
                                                         name = "adType"
                                                        value = "1"
                                                     
                                                         type = "radio">
                                                    Gewerbe </label>

                                                <div class="gewerbe-check"><label class="radio-inline" for="adMwst">
                                                    <input name = "adMwst"
                                                          value = "1"
                                                          type  = "checkbox">
                                                         Mwst ausweisbar
                                                  </label>
                                                </div>

JavaScript

var $contracts = $('.new-contract, .gewerbe-check').hide();

    $("#privat, #gewerbe").click(function(){
        $contracts.hide();       
        $('.'+$(this).attr('id')+'-check').show();
    });