Read the extension delay at help set.
(%foo%) , cmd . , . . , , .
,
setlocal enabledelayedexpansion
, , (!foo!), , .
@echo off
setlocal enabledelayedexpansion enableextensions
set cond=true
echo %cond%
if %cond%==true (
echo "cond is true"
REM the below input does work now
set /p name1="enter your name"
echo name is: !name1!
)