Nice question. There was a discussion about the topic here https://community.databricks.com/s/question/0D53f00001c9RUYCA2/whats-the-equivalent-of-declare-in-da...
So there are functions, widgets, or just combining Python with SQL. Probably I would choose SQL functions as they are permanent and stay in metastore (but can not be used for everything).
CREATE OR REPLACE FUNCTION my_name(name STRING COMMENT 'my name')
RETURNS STRING
COMMENT 'just first name'
CONTAINS SQL DETERMINISTIC
RETURN name || 'Hubert'
My blog: https://databrickster.medium.com/