It seems like there is something else called Afisho_rankimin in your DB Therefore the function is not getting created. You can try calling your function something else. E.g.
CREATE FUNCTION dbo.Afisho_rankimin1(@emri_rest int)
Declare @rankimi int
Also note that you have to call this only once, not each time you call the function. After that try calling
SELECT dbo.Afisho_rankimin1(5) AS Rankimi
Join the SQL Course fast, to Learn SQL concepts in detail and get certified.