Hi @Test_Meold,
You could look at the crowdsale contracts in OpenZeppelin Contracts 2.x: https://docs.openzeppelin.com/contracts/4.x/crowdsales (these accept Ether) and you could adapt for tokens: Example on how to use ERC20 token in another contract