I have noticed that yum install python3 or apt-get install python3 python 3.6 but I am unable to understand why it installs this specific version; 3.8 is the latest version of python. Why does it pick 3.6 in specific ?
This just depends on the OS you are using. Each OS packages a certain version of python and sticks with it. For example:

CentOS 7: python 3.6
CentOS 8: python 3.6
Ubuntu 16.04: python 3.5
Ubuntu 18.04: python 3.6
Ubuntu 20.04: python 3.8

NOTE: There are some OS that use rolling releases and that thus will update their default python version, but that is more rare.
Why does yum install python3 install python3.6