How to Repair "Orphaned" Database in SQL Server 2016 So, in my haste, I ran a script to create a database but I did not select the
full script before running it. I ended up with a bunch of tables without a "parent" database. Then I created a database intending to somehow attach the tables to it. But I have no clue on how to do it.

Short of dropping all the objects one by one and rerunning the original script, or changing the name of the database and running the script, is there a way of attaching the tables to the database? Tables are empty, i.e., no rows values have been inserted into them yet. Maybe using ALTER statements to attach tables to database?
You cannot attach a table to a database.  You can get the system to make a script for CREATE TABLE which you would then have to run on the other database.  However, you already have that script so you might as well use it.

If you know the table names that were accidentally created and you don't want to delete them one by one then you can make a quick script to delete the "bad" copies from the other database.

IF EXISTS (SELECT * FROM information_schema.tables WHERE name = 'badtable')
 DROP TABLE badtable;


In 2016 you could also:

DROP TABLE IF EXISTS dbo.badtable;