This might well vary between countries, but passing sentence is typically the role of the judge or magistrate, and separate from determining guilt, which may be determined be a jury or lower court.
e.g. in the UK & other common law states once a defendant is found guilty a judge or magistrate will determine sentence and consider these factors, among others.
Depending on the severity of the crime, the sentencing may also be referred by a magistrate to a higher court able to impose a more severe penalty.
e.g. in the UK & other common law states once a defendant is found guilty a judge or magistrate will determine sentence and consider these factors, among others.
Depending on the severity of the crime, the sentencing may also be referred by a magistrate to a higher court able to impose a more severe penalty.
(see https://www.judiciary.uk/you-and-the-judiciary/sentencing/ for a good example)