If you fulfill all the necessary requirements and successfully get the role in the guild, you will be able to have the role in Discord as well, but the Discord role distribution can take some time. Please check if you are connected to your Guild profile with the correct Discord account. Keep in mind that not all of the roles has a Discord reward, so you will not get a Discord role automatically after every guild role.
If you still face issues after 24 hours, please contact the Guild Support.