Morocco has three times more people than Portugal, so it's not as if they didn't have the people.
It also has a long Atlantic coastline.
Morocco has three times more people than Portugal, so it's not as if they didn't have the people.
Actually during the age of colonialism Morocco would have had a roughly equivalent population.
In 1500 Portugal had 1.1 million people, this increased to 2.1 million by 1730. The maximum pre-industrial population was 3.2 million in 1838.
Morocco's population in 1900, after 4 centuries of population growth, was 3.8 million. So back in 1500 it would have much less, probably about the same as Portugal then.
And a significant amount of its settlements would have been in the Atlas Mountains, not so close to the Atlantic coast. Marrakech and Fez were very large cities, both inland. So not as many people were in ports.
I'm not saying this is a full answer (someone else will probably bring up Portugal's naval tradition and Henry the Navigator), just pointing out this one aspect in your description. Populations were way different (and of course lower) before industrialization.
Part of it had to do with the Portuguese and Spanish focus on outflanking the Islamic world by sea. Europe, thanks to the defunct Mongol empire, knew about East Asian and Indian Ocean opportunities of trade. But the conversion of the Golden Horde and growth of the Ottoman Empire restricted such trade.
Spain and Portugal, especially the latter, developed in decades after the time of Henry The Navigator this idea of getting around Africa to secure trade with the Far East. There was an economic incentive to develop new trade routes. The Islamic world already had trade, partly via land, with the Far East, so there was no particular incentive in Islam to explore into the Atlantic.
The discovery of America was an accidental spin-off of this, and Spain rapidly acquired American outposts. Even if Moroccan rulers had thought about it, they would have been stymied by those outposts in the decades after 1492.
Then why in the treaty of tripoli they "the founding fathers of america" asked to start a colony in the empire of Morocco or ameruk and flat out that wrote that america is not a Christian nation and the letters they sent to the sultan went to what is now nyc so the real question is why are they lying about Black Americans being from Africa when clearly we are from here America only brought 300,000 slaves here if we were slaughtered so much how did that number grow to 10,000,000 that's the real question