I messed up guys

I gave my child last name after his father. To find out a few days later he texts me saying he has no plan to be in this child’s life at all extra. He a few days old . Is there anyway I can undo this and with out father knowing his name isn’t on the birth certificate. I will get child support ect but I feel stupid for giving his last name in the first place. I don’t want my son in a few years to ask me why I gave him a strangers last name and be upset with me.