Paying with a credit card on the internet is safe, if it goes through a secure connection.
With a secure connection, there is a padlock in the browser and the web address starts with https.
If padlock and https are in order, this means that the connection is secure, and data cannot be intercepted.

Sometimes it happens that credit card information is stolen in the event of burglaries in web stores.
Even large, well-known web stores are not 100% safe for this.
If damage occurs due to misuse of your credit card, it will be reimbursed by the credit card company.
Note: Do not give your credit card number via an unsecured connection, and do not put it in an email.
That way the number can be intercepted.
If a company asks for a credit card number, for example to confirm a hotel reservation, pass it on over the phone.