The latest prepackaged PHP 8 for macOS ships with PDO_ODBC support already activated.
phpinfo() confirms that:
PDO
PDO support enabled
PDO drivers mysql, odbc, sqlite
pdo_mysql
PDO Driver for MySQL enabled
Client API version mysqlnd 8.4.15
Directive Local Value Master Value
pdo_mysql.default_socket /tmp/mysql.sock /tmp/mysql.sock
PDO_ODBC
PDO Driver for ODBC (iODBC) enabled
ODBC Connection Pooling Enabled, strict matching
pdo_sqlite
PDO Driver for SQLite 3.x enabled
SQLite Library 3.50.4
So could you please check which version you're using and see what phpinfo()returns?
By the way, how did you find out that PDO_ODBC was missing? Was there an error message?